我运行时出现以下错误apt install gimp
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:
gimp : Depends: libgimp2.0 (>= 2.9.7~17-ubu16.04.2.2~ppa~9eb75cd) but it is not going to be installed
Depends: libgimp2.0 (<= 2.9.7~17-z) but it is not going to be installed
Depends: gimp-data (>= 2.9.7~17) but it is not going to be installed
Depends: gimp-data (<= 2.9.7~17-z) but it is not going to be installed
Depends: libgegl-0.3-0 (> 1:0.3.21~16) but it is not going to be installed
Depends: libmypaint (>= 1.4.0~7-u16.04.1~ppa~c196a86) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
编辑:我最终从Ubuntu 软件。
答案1
您必须卸载瘸子并删除外部瘸子来自软件源的 PPA。
$ sudo apt remove gimp
然后打开软件与更新并从中删除 PPA“其他软件”。
之后,您可以安装一个新的干净实例瘸子:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install gimp
答案2
几周前更新后,我在 BOINC Manager 中遇到了类似的问题。我的解决方案的一般形式可能会解决您的问题。
我仔细研究了尝试安装的软件包的依赖项,然后查找了依赖于同一软件包的旧版本的其他软件包。该依赖项(尤其是在列出较新版本破坏第二个软件包的情况下)阻止安装程序删除/升级依赖项,从而阻止安装所需的软件包。
幸运的是,Ubuntu 中的这种冲突可能只会发生在相对不常见的软件包或来自第三方存储库的软件包中,因此搜索范围缩小了。就我而言,我必须在golly
Life 模拟器和 BOINC Manager 之间进行选择,因为它们依赖于不同版本的 GTK 支持库,并且会被这些库破坏。我卸载了golly
BOINC Manager,然后安装并运行正常。
找到冲突的库,您就会发现为什么 GIMP 无法安装。