Ubuntu12.04安装gimp-2.8

Ubuntu12.04安装gimp-2.8
Ubuntu12.04安装gimp-2.8

1.通过添加ppa源安装(如己安装2.6版,则要先卸载)
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo atp-get install gimp gimp-plugin-registry gimp-data-extras

2.源码安装
先下载gimp-2.8的源码包
wget  ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.6.tar.bz2

tar -jxvf gimp-2.8.6.tar.bz2  -C /usr/local/src
cd  /usr/local/src/gimp-2.8.6

以下是gimp2.8源码中的INSTALL文件,我们可以大致看一下她所依赖的库文件,当然,大部分的依赖库系统都支持的比较全,也是比较新的,这一点很大程度上是利益于ubuntu,实际是除去很多第三方库,在12.04上只要安装以下几个库即可。

  1. You need to have installed a recent version of pkg-config available
     from http://www.freedesktop.org/software/pkgconfig/.

  2. You need intltool (at least 0.40.1, but preferably a newer version).
     Intltool can be downloaded from
     http://ftp.gnome.org/pub/gnome/sources/intltool/

  3. You need to have GEGL version 0.2.0 or newer and babl version
     0.1.10 or newer. You can get them from http://gegl.org/ or clone
     them from the GNOME git repository:

       git://git.gnome.org/babl
       git://git.gnome.org/gegl

  4. You need to have installed GTK+ version 2.24.10 or newer.
     GIMP also need a recent versions of GLib (>= 2.30.2), GDK-Pixbuf
     (>= 2.24.1), and Pango (>= 1.29.4). Sources for these can be grabbed
     from ftp://ftp.gtk.org/.

  5. We use cairo >= 1.10.2, which is hosted at
     http://www.cairographics.org/.

  6. We require PangoCairo, a Pango backend using Cairo. Make sure you
     have Cairo, FreeType2 and fontconfig installed before you compile
     Pango. GIMP depends on freetype2 being newer than version 2.1.7
     and fontconfig 2.2.0 or newer. Older versions are known to have
     bugs that seriously affect the stability of GIMP.

  7. We use dbus-glib if available. Grab it from
     http://dbus.freedesktop.org/releases/dbus-glib/

  8. Access of remote files is implemented in the URI plug-in. There
     are several possible implementations for this. The implementation
     used is determined when you configure GIMP. By default the
     GIO/GVfs backend is used. If you don't have GVfs support on your
     target platform, you should pass the '--without-gvfs' option to
     configure. The configure script will then try to detect another
     method for accessing remote files.

  9. You may want to install other third party libraries or programs
     that are needed for some of the available plug-ins. We recommend
     to check that the following libraries are installed: lcms,
     libpng, libjpeg, libpoppler, libtiff, webkit, libmng, librsvg,
     libwmf, libz, libbzip2, libgs (Ghostscript), libaa and libjasper.

 10. The Python extension requires Python development headers to be
     present. You will also need PyGTK and the respective development
     headers.

 11. Configure GIMP by running the `configure' script. You may want
     to pass some options to it, see below.

 12. Build GIMP by running `make'. The use of GNU make is recommended.
     If you need to tweak the build to make it work with other flavours
     of make, we'd appreciate if you'd send us a patch with the changes.

 13. Install GIMP by running `make install'. In order to avoid clashes
     with other versions of GIMP, we install a binary called gimp-2.8.
     By default there's also a link created so that you can type 'gimp'
     to start gimp-2.8.

Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
lying around on your system, otherwise configure may fail to find the
new ones.


Generic instructions for configuring and compiling auto-configured
packages are included below. Here is an illustration of commands that
might be used to build and install GIMP. The actual configuration,
compilation and installation output is not shown.

  % tar xvfz gimp-2.8.x.tar.gz    # unpack the sources
  % cd gimp-2.8.x                    # change to the toplevel directory
  % ./configure                        # run the `configure' script
  % make                                # build GIMP
  % make install                      # install GIMP



所以我们首先安装编译gimp2.8的库
######
babl
######
wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.10.tar.bz2
tar -jxvf babl-0.1.10.tar.bz2 -C /usr/local/src
cd /usr/local/src/babl-0.1.10
./configure && make && make install
注意:要做一个软链接,不然,在编译gegl时会报找不到libbabl-0.1.so.0这个库文件
ln -s /usr/local/lib/libbabl-0.1.so.0 /lib

######
gegl
######
wget ftp://ftp.gimp.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2
tar -jxvf gegl-0.2.0.tar.bz2 -C /usr/local/src
cd /usr/local/src/gegl-0.2.0
./configure && make && make install
注意:要做一个软链接,不然,在启动gimp时会报找不到libgegl-0.2.so.0这个库文件
ln -s /usr/local/lib/libgegl-0.2.so.0 /lib

#############
Python extension
#############
apt-get install python-gtk2-dev


当然,网上还有一种比较简单的ppa方法来安装依赖库(未经本人实测,有兴趣的朋友可以试试)
 
 sudo add-apt-repository ppa:noobslab/ppa-gimp
 sudo apt-get update
 sudo apt-get install libgegl-0.2-0 libgegl-0.2-0-dbg libgegl-dev libgegl-doc gegl
 sudo apt-get install libbabl-0.1-0 libbabl-0.1-0-dbg libbabl-dev libbabl-doc
 sudo apt-get build-dep gimp

 
待一切准备妥当后,即可编译我们的大主角gimp-2.8.6
 ./configure --prefix=/opt/gimp-2.8.6
 make
 make install

最后,做一个软链接,省去敲入绝对路径的麻烦
ln -s /opt/gimp-2.8.6/bin/gimp /usr/bin

Ubuntu12.04安装gimp-2.8

原文地址:https://www.cnblogs.com/lixuebin/p/10814577.html