4

I have compiled bluez 5.37 from sources, and installed it. I would like to install the package bluez-utils, which depends on bluez.

sudo apt-get install bluez-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bluetooth bluez bluez-alsa bluez-gstreamer
Suggested packages:
  bluez-hcidump
The following NEW packages will be installed:
  bluetooth bluez bluez-alsa bluez-gstreamer bluez-utils
0 upgraded, 5 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/777 kB of archives.
After this operation, 3,497 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Unfortunately, when I try to, it tries to install bluez 4.101-0ubuntu13.1 which does not install correctly on my host.

Selecting previously unselected package bluez.
(Reading database ... 557098 files and directories currently installed.)
Preparing to unpack .../bluez_4.101-0ubuntu13.1_amd64.deb ...
Unpacking bluez (4.101-0ubuntu13.1) ...
Selecting previously unselected package bluetooth.
Preparing to unpack .../bluetooth_4.101-0ubuntu13.1_all.deb ...
Unpacking bluetooth (4.101-0ubuntu13.1) ...
Selecting previously unselected package bluez-alsa:amd64.
Preparing to unpack .../bluez-alsa_4.101-0ubuntu13.1_amd64.deb ...
Unpacking bluez-alsa:amd64 (4.101-0ubuntu13.1) ...
Selecting previously unselected package bluez-gstreamer.
Preparing to unpack .../bluez-gstreamer_4.101-0ubuntu13.1_amd64.deb ...
Unpacking bluez-gstreamer (4.101-0ubuntu13.1) ...
Selecting previously unselected package bluez-utils.
Preparing to unpack .../bluez-utils_4.101-0ubuntu13.1_all.deb ...
Unpacking bluez-utils (4.101-0ubuntu13.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up bluez (4.101-0ubuntu13.1) ...
reload: Job is not running: dbus
invoke-rc.d: initscript dbus, action "force-reload" failed.
start: Job failed to start
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing package bluez (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of bluetooth:
bluetooth depends on bluez; however:
Package bluez is not configured yet.
dpkg: error processing package bluetooth (--configure):
dependency problems - leaving unconfigured
...

In another attempt, I tried to install bluez 5 from packaging, using this answer but it failed too

Try this: sudo apt-get purge bluez # remove old versions sudo add-apt-repository ppa:vidplace7/bluez5 sudo apt-get update sudo apt-get install bluez

Again, I get a dbus force-reload failure:

Preparing to unpack .../bluez_5.35.0+upstream-201601200846~rev18516~pkg9~ubuntu14.04.1_amd64.deb ...
Unpacking bluez (5.35.0+upstream-201601200846~rev18516~pkg9~ubuntu14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up bluez (5.35.0+upstream-201601200846~rev18516~pkg9~ubuntu14.04.1) ...
reload: Job is not running: dbus
invoke-rc.d: initscript dbus, action "force-reload" failed.
bluetooth start/running
Processing triggers for ureadahead (0.100.0-16) ...

Note also that my system is up-to-date. Just to make sure, I tried to install bluez after a cleanup and update:

$ sudo apt-get purge bluez.*
$ sudo apt-get update 
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo apt-get install bluez
...
Setting up bluez (4.101-0ubuntu13.1) ...
reload: Job is not running: dbus
invoke-rc.d: initscript dbus, action "force-reload" failed.
start: Job failed to start
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing package bluez (--configure):
subprocess installed post-installation script returned error exit   status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
bluez
E: Sub-process /usr/bin/dpkg returned an error code (1)

In /etc/init.d there is a bluetooth script. If I launch it, it does not complain, but the logs show that actually it is not working:

$ sudo /etc/init.d/bluetooth restart
 * Stopping bluetooth                                                    [ OK ] 
 * Starting bluetooth                                                    [ OK ] 



$ dmesg | tail 
[523602.147016] init: bluetooth main process (2672) terminated with status 1
[523602.147023] init: bluetooth main process ended, respawning
[523602.162789] init: bluetooth main process (2681) terminated with status 1
[523602.162797] init: bluetooth respawning too fast, stopped

So how can I install bluetooth on my system? I don't care that much if I have bluez 4 or bluez 5, but I want to be able to install bluez-utils one way or another...

Thanks

user369353
  • 71
  • 1
  • 1
  • 7
  • There is a bug report, according to comments there this should be fixed if you have updated upstart. Is your system up-to-date? sudo purge bluez.*; sudo apt-get update && sudo apt-get dist-upgrade – bain Jan 21 '16 at 11:22
  • Yes, I confirm I am up to date (just checked again), but unfortunately that does not solve the issue. I'm not sure the bug report is solved either. – user369353 Jan 21 '16 at 12:59
  • Does the force-reload actually fail in the second case or does the install carry on? Some bluez.postinst have a line invoke-rc.d dbus force-reload || true so if it fails the install still completes - check yours with cat /var/lib/dpkg/info/bluez.postinst. If the install completes then it should be ok, force-reload just reloads the config, you can do the same with /etc/init.d/bluez restart or just reboot once. – bain Jan 21 '16 at 18:17
  • No, the force-reload fails once again. Setting up bluez (4.101-0ubuntu13.1) ... reload: Job is not running: dbus invoke-rc.d: initscript dbus, action "force-reload" failed. start: Job failed to start invoke-rc.d: initscript bluetooth, action "start" failed. dpkg: error processing package bluez (--configure): subprocess installed post-installation script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1)

    Besides, there is no /etc/init.d/bluez on my system, only a /etc/init.d/bluetooth. But it does not seem to be starting ok.

    – user369353 Jan 28 '16 at 09:59
  • I'll edit the question for clarity :) – user369353 Jan 28 '16 at 10:02
  • Try adding || true to the end of the invoke-rc.d dbus force-reload line in bluez.postinst – bain Feb 06 '16 at 17:55
  • Months later, after another upgrade, and sudo purge blue*; sudo apt-get update && sudo apt-get dist-upgrade, I finally manage to installe bluez-utils :) Actually, there is still that invoke-rc.d: initscript dbus, action "force-reload" failed but it continues. Setting up bluez (4.101-0ubuntu13.1) ... reload: Job is not running: dbus invoke-rc.d: initscript dbus, action "force-reload" failed. bluetooth start/running, process 21366 Setting up bluez-cups (4.101-0ubuntu13.1) ... and dpkg -l | grep blue shows only fully installed packaged, no failures. – user369353 Aug 18 '16 at 15:15
  • so, I'll check if it really works now, and if so mark the issue as solved. – user369353 Aug 18 '16 at 15:15
  • Yes, it works ! So cool ! @bain, you basically had the solution, let me know how I can "vote" for your solution! – user369353 Aug 18 '16 at 15:28

1 Answers1

3

The issue was that bluez wouldn't install correctly on the system with message

reload: Job is not running: dbus invoke-rc.d: initscript dbus, action "force-reload" failed. start: Job failed to start invoke-rc.d: initscript bluetooth, action "start" failed.

In February, an upgrade did not solve the problem, but months later now in August, it does. You simply need to do:

sudo apt-get purge bluez*; sudo apt-get update && sudo apt-get dist-upgrade; sudo apt-get autoremove

and then re-install.

$ sudo apt-get install bluez-utils
...
Setting up bluez (4.101-0ubuntu13.1) ...
reload: Job is not running: dbus
invoke-rc.d: initscript dbus, action "force-reload" failed.
bluetooth start/running, process 21366

Note that the reload for bluez "fails" but the package still installs correctly.

ii  bluez                                             4.101-0ubuntu13.1                            amd64        Bluetooth tools and daemons
user369353
  • 71
  • 1
  • 1
  • 7