After upgrading from Ubuntu 11.10 to 12.04 I found gimp couldn’t access the shared libraries it needed, most likely an error with symbolic links as described by lovelyindia in this post.
Fix 1:
He managed to fix the issue by removing gimp and purging the offending libraries and then letting apt deal with the libraries when he re-installed gimp, as per the below commands:
sudo apt-get update
sudo apt-get purge gimp libgegl* libbabl*
sudo apt-get install gimp
sudo apt-get clean
While this is likely to work for most people encountering this issue, it didn’t for me.
Fix 2:
Then I remembered I had used the repogen source list generator, in which I chose to include the gimp svn build. While you may not have gone about it the same way, you may also have a different repository in your sources.list file which is causing this issue, if the previous method did not resolve the issue.
In order to fix this, I had to open the sources.list file and comment out the offending repo.
sudo gedit /etc/apt/sources.list
Now search for any reference to gimp, in my case this was the lines I changed:
#### Gimp SVN - https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 405A15CB
deb http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu precise main
I commented out the line linking to the repo by adding a ‘#’ to the front, as below:
#### Gimp SVN - https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 405A15CB
# deb http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu precise main
I then uninstalled gimp, once I knew it may have been the newly added repository that I had added:
sudo apt-get purge gimp
Then I saved and exited the file and updated apt:
sudo apt-get update
I then re-installed gimp:
sudo apt-get install gimp
This solved the issue for me, I hope this helps!