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
sudo purge bluez.*; sudo apt-get update && sudo apt-get dist-upgrade
bluez.postinst
have a lineinvoke-rc.d dbus force-reload || true
so if it fails the install still completes - check yours withcat /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.