使用 bluez-5.37(或 bluez-4.101)安装蓝牙或 bluez-utils 包失败

使用 bluez-5.37(或 bluez-4.101)安装蓝牙或 bluez-utils 包失败

我已经从源代码编译了 bluez 5.37 并安装了它。我想安装依赖于 bluez 的软件包 bluez-utils。

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]

不幸的是,当我尝试时,它会尝试安装 bluez 4.101-0ubuntu13.1,但无法在我的主机上正确安装。

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
...

在另一次尝试中,我尝试从包装中安装 bluez 5,使用这个答案但也失败了

试试这个: sudo apt-get purge bluez # 删除旧版本 sudo add-apt-repository ppa:vidplace7/bluez5 sudo apt-get update sudo apt-get install bluez

再次,我收到 dbus 强制重新加载失败:

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) ...

还请注意,我的系统是最新的。为了确保万无一失,我尝试在清理和更新后安装 bluez:

$ 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)

/etc/init.d 中有一个蓝牙脚本。如果我启动它,它不会报错,但日志显示它实际上不起作用:

$ 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

所以如何在我的系统上安装蓝牙? 我不太在乎我有 bluez 4 还是 bluez 5,但我希望能够以某种方式安装 bluez-utils......

谢谢

答案1

问题是 bluez 无法在系统上正确安装,并显示以下消息

reload:作业未运行:dbus invoke-rc.d:initscript dbus,操作“force-reload”失败。start:作业无法启动invoke-rc.d:initscript bluetooth,操作“start”失败。

二月,升级并没有解决问题,但几个月后现在八月,确实如此。你只需要执行以下操作:

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

然后重新安装。

$ 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

请注意,bluez的重新加载“失败”,但包仍然安装正确。

ii  bluez                                             4.101-0ubuntu13.1                            amd64        Bluetooth tools and daemons

相关内容