尝试安装 libminiupnpc-dev 时出现软件包损坏的情况

尝试安装 libminiupnpc-dev 时出现软件包损坏的情况

我不确定如何解决以下损坏的软件包错误。我从 PPA(1.6-precise2)安装了 libminiupnpc8,当我想安装 libminiupnpc-dev 时,它想从标准存储库安装 libminiupnpc8(1.6-3ubuntu1)。解决这个问题的最佳方法是什么?我可以在存储库列表中设置一个先例,以便它将 Ubuntu 存储库放在私有存储库之前吗?

$ sudo apt-get install libminiupnpc-dev
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:
 libminiupnpc-dev : Depends: libminiupnpc8 (= 1.6-3ubuntu1) but 1.6-precise2 is to be installed
E: Unable to correct problems, you have held broken packages.

答案1

最好的解决方案是,如果这些需要的软件包在官方的 Ubuntu 中存储库,删除该 PPA 并安装所需的软件包。

看起来它将libminiupnpc-dev从主存储库安装,而不是从 PPA 安装。如果你想以某种方式使用该存储库,你必须这样做固定。这意味着您需要在安装时获得该 PPA 的更高位置。为此,请运行以下命令:

gksudo gedit /etc/apt/preferences

然后将以下几行添加到编辑并保存:

Package: libminiupnpc-dev
Pin: release o=Ubuntu
Pin-Priority: 100

Package: libminiupnpc-dev
Pin: release o=LP-PPA-<ppa name>
Pin-Priority: 200

** 将 < ppa name > 替换为该 PPA 名称(不带短语苯丙胺:

相关内容