13

I have this issue when I search to install 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.

Nothing change after apt update & upgrade. Do you have a solution for me? Thanks to

Best,

Numael
  • 143

3 Answers3

11

One solution is to use aptitude. It is generally smarter than apt-get at resolving dependencies.

First, install aptitude:

sudo apt-get install aptitude

Then install Gimp using aptitude:

sudo aptitude install gimp

And then after running that, Gimp should be installed.

Daniel M.
  • 2,046
3

I would recommend installing Gimp as a flatpak, as the flatpak is maintained by the gimp developers.

sudo apt install flatpak

flatpak install flathub org.gimp.GIMP

and to run

flatpak run org.gimp.GIMP
Bruni
  • 11,099
2

Firstly, update and upgrade so everything is fresh:

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

Then, try these two commands:

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

They will usually fix broken or unmet dependencies.

You can also look for JUST files related with your package and purge them, then reinstall them:

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

Or you can use aptitude in place of apt or apt-get, aptitude is smarter than apt-get and will help deal with dependencies:

sudo aptitude install gimp

Hope it helps!

Ollie
  • 3,372