软件包 dbus 尚未配置完成

在尝试升级(sudo apt-get upgrade)Ubuntu 12.04时,我遇到了一对包,会导致dbus依赖项出现以下apt-get安装错误:
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of accountsservice:
 accountsservice depends on dbus; however:
  Package dbus is not configured yet.
dpkg: error processing accountsservice (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 dbus
 accountsservice
E: Sub-process /usr/bin/dpkg returned an error code (1)
1个回答

解决dpkg返回错误的类似问题的方法是使用:
dpkg --configure -a
apt-get install -f

两者都没有解决问题,并产生了相同的错误输出。在某些情况下,aptitude可能是一个比apt-get更好的选择。 解决方案是使用aptitude install -f:
aptitude install -f

解释: 作为一个特殊情况,没有参数的aptitude install将对任何已存储/待处理的操作进行处理。 当给出-f选项时,aptitude在尝试修复损坏软件包的依赖关系时会更加积极,即使这意味着忽略命令行上请求的操作。