Wednesday 2 June 2010

Installing GIMP 2.7 on Ubuntu 9.10 Karmic

I wanted to try the latest version of GIMP, to see the long sought after single-window mode in action.

Method 1 - PPA

The first, and by far the easiest method is by using the PPA on this page: https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn

You simply add the repo with this command: 
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn
and then add the GPG key:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 405A15CB

PROBLEM HTTP fetch error 7: couldn't connect to host
SOLUTION Open up the outbound TCP port 11371

Then you can install gimp using apt-get (or simply run an update if you already had it installed).


Method 2 - From source

The second method is to install it from source, and while this is much more of a challenge, it doesn't rely on any third party PPAs...

PREPERATION
3 commands to modify (change /home/jack to your home dir), and execute:
mkdir /home/jack/programs/gimp-2.7
export PKG_CONFIG_PATH=/home/jack/programs/gimp-2.7/lib/pkgconfig/:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/home/jack/programs/gimp-2.7/lib:$LD_LIBRARY_PATH

INSTRUCTIONS
Download gimp-2.7.0.tar.bz2 from http://www.gimp.org/, and extract it and run the installation commands:
./configure --prefix=/home/jack/programs/gimp-2.7
make
sudo make install
But of course I encountered loads of problems during the configuration stage:

PROBLEM configure: error: Your intltool is too old. You need intltool 0.40.1 or later.
SOLUTION sudo apt-get install intltool

PROBLEM No package 'babl' found
SOLUTION Found http://developer.gimp.org/git.html which has lots of the tools you will probably need including babl and gegl. Eventually found my way to ftp://ftp.gtk.org/pub/babl and downloaded the latest version of babl (for me, this was 0.1/babl-0.1.2.tar.bz2). Extract it, and do the following installation commands:
./automake.sh --prefix=/home/jack/programs/gimp-2.7
make
sudo make install
BUT I encountered more problems along the way:

PROBLEM Got an error message saying I needed ruby
SOLUTION sudo apt-get install ruby1.8-dev

I think at this point babl successfully installed. Back to trying to ./configure gimp, and now we get the following problem:

PROBLEM No package 'gegl' found
SOLUTION Similar to babl, we go to ftp://ftp.gtk.org/pub/gegl and download the latest version, extract it and try to install it with:
./automake.sh --prefix=/home/jack/programs/gimp-2.7
make
sudo make install
But of course we encounter lots of problems:

PROBLEM You must have glib-gettextize installed to compile GEGL
SOLUTION sudo apt-get install libglib2.0-dev

PROBLEM Loads of errors about GDK and GTK, the first of which was:
gegl-paint.c:22:21: error: gtk/gtk.h: No such file or directory
SOLUTION (Note: this auto-installed LOADS of dependencies for me):
sudo aptitude install libgtk2.0-dev
May also need to execute this next command, but not sure (BEWARE: BIG DOWNLOAD!)
sudo apt-get install asciidoc

Then I was back on track for the main GIMP installation, so tried to run the configure script again (remember the --prefix)...

PROBLEM Checks for TIFF libary failed
SOLUTION sudo apt-get install libtiff4-dev

PROBLEM Could not find Python headers
SOLUTION sudo apt-get install python2.6-dev

PROBLEM Could not find PyGTK 2.10.4 or newer
SOLUTION sudo apt-get install python-gtk2-dev

And then I was able to complete the install!!!! You can then run it using /home/jack/programs/gimp-2.7/bin/gimp-2.7


4 comments:

  1. Nice, will have to check this out

    ReplyDelete
  2. Great Post!!!
    Thank you ^___^

    ReplyDelete
  3. Thank you. I already tried this on Ubuntu 11.10 Oneiric Ocelot.
    It works!! :D

    ReplyDelete
  4. Hello!

    For me this tutorial was very helpful until some  point, where I got on my newly installed Oneric Ocelot another error when building gegl:
      CC     gegl-buffer-access.lo
    gegl-tile-backend-tiledir.c:20:21: fatal error: gio/gio.h: No such file or directory
    compilation terminated.
    In file included from gegl-buffer-access.c:23:0:
    /home/florin/programs/gimp-2.7/include/glib-2.0/glib-object.h:25:30: fatal error: gobject/gbinding.h: No such file or directory
    compilation terminated.
    In file included from gegl-buffer.c:42:0:
    /home/florin/programs/gimp-2.7/include/glib-2.0/glib-object.h:25:30: fatal error: gobject/gbinding.h: No such file or directory
    compilation terminated.
    make[3]: *** [gegl-tile-backend-tiledir.lo] Error 1
    make[3]: *** Waiting for unfinished jobs....
    make[3]: *** [gegl-buffer-access.lo] Error 1
    make[3]: *** [gegl-buffer.lo] Error 1

    If needed, I have detailed steps of everything I did before this and all packages I've installed for Gimp. Unfortunately, until we have 2.7.x in PPA's (2.7.5 tests from PPA+packages ruined by Oneiric and I had to reinstall), Gimp&it's packages seems to have really nasty requirements :(

    ReplyDelete