Ubuntu 20.04 安装 gimp 时出错:依赖:libgimp2.0(>= 2.10.18)但不会安装

Ubuntu 20.04 安装 gimp 时出错:依赖:libgimp2.0(>= 2.10.18)但不会安装

当我搜索安装 Gimp 时遇到了这个问题:

$ sudo apt-get 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.10.18) but it is not going to be installed
        Depends: libgimp2.0 (<= 2.10.18-z) but it is not going to be installed
        Depends: libgegl-0.4-0 (>= 0.4.22) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt 更新和升级后没有任何变化。您有解决方案吗?感谢

最好的,

答案1

一种解决方案是使用aptitude。它通常比apt-get解决依赖关系更聪明。

首先,安装aptitude

sudo apt-get install aptitude

然后使用以下方式安装 Gimp aptitude

sudo aptitude install gimp

然后运行该程序后,Gimp 就安装完成了。

答案2

我建议将 Gimp 安装为 flatpak,因为 flatpak 由 gimp 开发人员维护。

sudo apt install flatpak

flatpak install flathub org.gimp.GIMP

然后运行

flatpak run org.gimp.GIMP

答案3

首先,更新并升级,使一切都是最新的:

sudo apt-get update && sudo apt-get upgrade -y

然后,尝试这两个命令:

sudo dpkg --configure -a
sudo apt-get install -f

他们通常会修复损坏或未满足的依赖关系。

您还可以查找与您的包相关的文件并清除它们,然后重新安装它们:

sudo dpkg --list
sudo apt-get purge <file-name>

或者你可以使用aptitude代替aptapt-getaptitude比 更聪明,apt-get并将有助于处理依赖关系:

sudo aptitude install gimp

希望能帮助到你!

相关内容