我正在运行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 update
和apt-get upgrade
,但这些错误尚未清除。我还尝试了在AskUbuntu上推荐的-f install
,--configure -a
,-f install
顺序,但是再次失败了。任何帮助将不胜感激!
答案 0 :(得分:0)
我能够通过删除debhelper
,然后同时安装dh-systemd
和debhelper
来使此工作正常进行:
sudo apt-get remove debhelper
sudo apt-get install dh-systemd
sudo apt-get install debhelper -t xenial-backports
(第二步同时安装了dh-systemd
和debhelper
,最后一步升级了debhelper
和dh-systemd
,以及其他一些软件包)。