We are going to build gimp from the directory $HOME/gimp/2.7.1 and install it into $HOME/gimp-2.7.1 or /opt/gimp-2.7.

Installing to my home directory allows me to have multiple copies of the gimp, and run which ever version that I want. So my tree actually looks something like this:
(my build files)
(the install area)

Step 1. Start with a clean install of Ubuntu.

Of course you don’t need to do that, but I thought it was a great place to start. I did this by installing a version of 10.04 LTS Ubuntu 64bit on a Sun VirtualBox VM. If you don’t know what I just said, then just start with Ubuntu 10.04.

Step 2. Download the dependencies.

sudo apt-get install gettext libglib2.0-0 libglib2.0-dev \
    libgtk2.0-dev ruby intltool libtiff4-dev python-gtk2-dev \
    libjasper-dev libexif-dev libmng-dev liblcms1-dev \
    libxpm-dev librsvg2-dev libwmf-dev libasound2-dev \
    libdbus-glib-1-dev libaa1-dev libwebkit-dev libhal-dev \

Step 3. Download the source files that we need to install.

mkdir -p gimp/2.7.1/
cd gimp/2.7.1
wget ftp://ftp.gimp.org/pub/babl/0.1/babl-0.1.2.tar.bz2
wget ftp://ftp.gimp.org/pub/gegl/0.1/gegl-0.1.2.tar.bz2
wget ftp://ftp.gimp.org/pub/gimp/v2.7/gimp-2.7.1.tar.bz2
tar xf babl-0.1.2.tar.bz2
tar xf gegl-0.1.2.tar.bz2
tar xf gimp-2.7.1.tar.bz2

Step 4. Pick somewhere to install

Now here we can choose where we want to install. The default is /usr/local/. (ie PREFIX=/usr/local), however that is known to cause problems. Personally, I want to have the installations and libraries seperate for each version, so that I can run whatever version of gimp that I want, so I’ll use PREFIX=$HOME/gimp-2.7.1. If you want to install system wide then use PREFIX=/opt/gimp-2.7.


Step 5. Start the build

You need “sudo make install” below if installing to /opt.

export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

cd babl-0.1.2
./configure --prefix=$PREFIX
make install

cd ../gegl-0.1.2
./configure --prefix=$PREFIX
make install

cd ../gimp-2.7.1
./configure --prefix=$PREFIX
make install

Step 6. Run the program

Now you can run gimp as:



  1. blog.bloke.com » Blog Archive » Gimp 2.7.1 is available (unstable) says:

    […] « HowTo Build gimp 2.7.1 from source step by step (Ubuntu) […]

  2. harrypopof says:

    thanks a lot for this howto but i think the last folder to compile gimp is gimp/2.7.1 and no /gimp-2.7.1

    best regards,

  3. cameron says:

    G’Day Harrypopof.

    It looks correct to me ..
    you build from gimp/2.7.1 and it installs into
    $PREFIX ($HOME/gimp-2.7.1)

    the last “cd ../gimp-2.7.1” is changing into the source directory for gimp
    so gimp/2.7.1/gimp-2.7.1.

    you can of course change it to something a litle easier if you only want to build one version..
    eg, you could build in $HOME/gimp-src and install into /opt/gimp-2.7


  4. sri says:

    hello everybody i have a vps hosting …where i get number of linux operating sys..with root access…i tried with all the steps explained above… but still i could not compile…is there any one to help me? sridvcati@gmail.com is my mail id…plz reply to my mail so that i can give username and password of my vps account…thanks alot in advance …expecting your mail….

  5. cameron says:

    what error did you get?

  6. sri says:

    hello cameron,
    I tried all the steps explained above ….gimp installed with no error messages but the last step seems not working when i write “$PREFIX/bin/gimp-2.7” i get a error message “Cannot open display: ”
    welll am using “windows ME ” with “ssh secure shell” to access my vps(ubuntu-10.04-64 ),gimp is installed in “/root/gimp/2.7.1/gimp-2.7.1/ ” your response is much appreciated…Thank you.

  7. cameron says:

    installing in root is a bad idea. But aside from that, when gimp starts, it needs an X display. normally when you run it own your own machine that is :0
    you could try running VNC, that is probably the easiest way. Hope that helps.

  8. sri says:

    hello cameeron,
    thanks for good response,but my idea is to run gimp-net-fu script,i hope it requires gimp to be compiled via root,any alternatives?

  9. cameron says:

    there is no need to run as root to run script-fu.

    But if you want to run gimp in headless mode, then you will need to use Xvfb.


  10. sri says:

    hello cameron,
    firstly i would like to say ,you are an ultimate guru ,thanks alot for all your replies….
    well my idea is to run gimp-net-fu script ,so that i should be able to desighn text or logos online,can you write step by step tutorial to run gimp-net-fu script from vps?

  11. cameron says:

    Yes, good idea. But it’s already been done.


    have fun!


  12. sri says:

    yes cameron,i know that its already been done on cooltext.com also…..
    this is what exactly what am trying to desighn,am just crazy to do that,so i bought vps ,am very very interested to desighn that,i did not get tutorial to install net-fu, i have scripts now, but am not sure how to compile gimp,6 months ago i messaged to alex(flemingtext) asking help to compile gimp…but he replied that he can not help me in this ,as he is busy running business…cameron do u have any idea?i will never forget you ,i gonna place your name with your link on all webpages….if am succeded….:)

  13. cameron says:

    Perhaps FlamingText can help you.

    see: http://www.aaa-buttons.com/ and see if something like that (a bit better looking) would be of interest to you. (see the add-text link on some of the buttons).

    Did you segregate those fonts yourself? (ie make the categories .. ) I’m looking for a nice way to break up all the fonts into categories so that they are easy to use on f/t.com


  14. sri says:

    hello cameron ,
    my intension is to clone flamingtext(dot)com or cooltext(dot)com….my basic idea is to desighn a logo generating script by compiling gimp…now i have every php and cgi scripts needed to generate logos online….but am not sure how to compile gimp and run gimp in background on my vps….thats the reason am eager to learn “how to use gimp as a backaend application” ?????….

  15. sri says:

    hello cameron,
    thanks for all your replies…please give me the tutorial to compile GTK 1.2.0 with gimp1.0.4 , i know it an old version…but am not finding the tutorial for this….also telll which is the best linux os to run gimp1.2.0 …?expecting your reply as quickly as possible….

  16. cameron says:

    I don’t have such a tutorial. That is like 10 years ago….

  17. Pranay says:

    Thanks for the guidence.
    Im using ubuntu 10.04.
    I have installed sucessfully without any errors, I dont know how to run this application after closing the terminal.
    How can i run this again..?
    I tried to create the launcher on desktop with the command used in terminal…
    host@user-desktop:~/gimp/2.7.1/gimp-2.7.1$ $PREFIX/bin/gimp-2.7

    but invain 🙁

  18. alexa says:

    hey admin,
    we have tutorial for gimp implementaion….
    we need tutorial for gimp-netfu.. we dont find help file online…thats what we need…. sri is right it may be old… but very effctive… do u have help file for that?

  19. rocky says:

    ya admin i think they are right… there is no online help installtion file for gimp net-fu script….gimp-net-fu may be the older one.. but more effective.. than new version,…if u update the installtion read me file…. for net-fu script.. it will be more helpfulll to all webmasters…….expecting responses from admin….

  20. Chris says:

    Great tutorial, thanks a lot. I was getting nowhere by myself and your tutorial made things a lot easier. I used it to install Gimp 2.7.1 in Peppermint OS. This is my first compiled package (well, technically, babl was but you get the idea.) The only thing I did differently was to use checkinstall in stead of make install.

    sudo checkinstall -D

    I’ve read that it works better than make install and it also leaves you with a .deb package that can be installed on other Debian-based distros.

  21. Issue with GIMP image editor says:

    […] that might help point you in the right direction: http://www.shallowsky.com/linux/gimpbuild.html http://blog.bloke.com/2010/06/howto-…y-step-ubuntu/ 'Hope that helps .. […]

  22. pst007x says:

    Hi All,

    Thanks for the info.

    I am using Ubuntu 11.10 64bit and the latest Gimp is 2.7.3, will this still work (changing the appropriate lines to gimp-2.7.3)?

    Do I have to uninstall Gimp 2.6?

    Thanks again

  23. cameron says:

    yes it’ll work. no need to uninstall.


  24. Eason says:

    Thanks a lot.
    It’s work to run after building it.
    But how could I debug it using eclipse?
    There is something wrong with my environment, I couldn’t launch eclipse debug mode, would you have any idea about this, thanks.

  25. cameron says:

    I haven’t used eclipse to debug C programs (I tend to use gdb or even better some log statements), but you can ask on irc.gimp.org #gimp where a bunch of developers hang out.
    And of course you should use the latest (2.7.4)

    hope that helps,


  26. pst007x says:

    To launch

    Make link to application:
    home/(YOUR NAME)/gimp-2.7.1/bin/gimp-2.7

    How to make a desktop launcher:
    To get started, make sure the gnome-panel package is installed by running the following commands in the terminal.

    sudo apt-get install –no-install-recommends gnome-panel

    Now run the following command in the terminal to launch Create Launcher dialog.

    gnome-desktop-item-edit ~/Desktop/ –create-new

    You can also press ALT + F2 and run the dialog. Once the Create Launcher dialog appears, you can give a suitable name for the launcher.In the Command field , type in the command to launch the application.

    Add script to:
    Home .gnome2 nautilus-script

    gnome-desktop-item-edit –create-new ~/Desktop

    right click make executable


    In the repo add menu editor “alacarte” then look for menu in your apps list

    Thanks all

Leave a Reply