dh-systemd的apt-get安装由于debhelper而失败,但是debhelper已经是最新版本

时间:2019-01-15 21:16:49

标签: ubuntu systemd apt-get dpkg

我正在运行Ubuntu 16.04。我想安装dh-systemd软件包。当我尝试使用apt-get时,会发生以下错误:

  sudo apt-get -f install dh-systemd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dh-systemd : Depends: debhelper but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

但是apt-get报告说debhelper是最新版本:

 sudo apt-get -f install debhelper
Reading package lists... Done
Building dependency tree       
Reading state information... Done
debhelper is already the newest version (10.2.2ubuntu1~ubuntu16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

我已经尝试过apt-get updateapt-get upgrade,但这些错误尚未清除。我还尝试了在AskUbuntu上推荐的-f install--configure -a-f install顺序,但是再次失败了。任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:0)

我能够通过删除debhelper,然后同时安装dh-systemddebhelper来使此工作正常进行:

sudo apt-get remove debhelper
sudo apt-get install dh-systemd
sudo apt-get install debhelper -t xenial-backports

(第二步同时安装了dh-systemddebhelper,最后一步升级了debhelperdh-systemd,以及其他一些软件包)。