4

I get this when ever i try and install anything with th Terminal:

    You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 gimp : Depends: libgimp2.0 (<= 2.6.12-z) but 2.8.0-1ubuntu0ppa3~precise is to be installed
        Depends: gimp-data (<= 2.6.12-z) but 2.8.0-1ubuntu0ppa3~precise is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I added myself to the root group in the grub recovery mode. Then did sudo apt-get -f install and got this:

Errors were encountered while processing:
 /var/cache/apt/archives/gimp_2.8.0-1ubuntu0ppa3~precise_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)
jrg
  • 60,611
jaorizabal
  • 3,748
  • 1
    Two things: have you actually tried running sudo apt-get -f install like it suggests, and did you recently add a PPA to try and get GIMP 2.8? – Marius May 07 '12 at 23:19

2 Answers2

2

Okay, from what I can tell, your problem is that you've added a PPA to try and upgrade to the latest version of GIMP, and it hasn't worked out. I think the best option for now is to remove the PPA so you can get back your ability to install software.

Open Update Manager and hit Settings. This will bring you to the Software Sources manager, which you can read more about here. Go to the "Other Software" tab and untick any PPA's you added related to GIMP.

Then open a terminal, and type these commands one at a time (you may have to run the third command before sudo apt-get remove gimp if it fails):

sudo apt-get update
sudo apt-get remove gimp
sudo apt-get -f
sudo apt-get upgrade

GIMP will be uninstalled, but it should get your system working again. You should also be able to reinstall the default version of GIMP from the repositories.

Marius
  • 1,781
  • 1
    I would just like to point out that Gimp 2.8 is very easy to build from source. http://www.gregorystrike.com/2012/05/03/how-to-build-gimp-2-8-from-source-in-ubuntu-12-04/ –  May 08 '12 at 03:24
  • @gecko Thanks, I was hoping that someone would post a guide like that as I've been meaning to check out 2.8 for myself. – Marius May 08 '12 at 04:05
2

Try this:

sudo apt-get build-dep <yourapp>
  • 2
    build-dep is used to install build dependencies. Could you elaborate why and how this would solve the OP's problem? – Andrea Corbellini Jan 27 '13 at 18:47
  • Because the problem is about dependencies and probably the tree es corrupt or have any error, in my case sudo apt-get -f install did no solve the problem. – Carlos_Mena Jan 28 '13 at 15:06
  • This solved a similar problem here. The cause? Some packages that were installed with dpkg -i. – valk Mar 03 '14 at 06:51