• [转]CentOS编译安装GIMP


    CentOS编译安装GIMP

    原文地址:http://www.ithao123.cn/content-97397.html

    gimp是扩平台的图像处理软件

    因为最近要在linux上做几张图片决定安装它试试

    直接yum install gimp貌似有问题

    一启动就说什么有错误

    还是决定走源码安装的不归路

    因为源码编译的需要的包可能系统中会存在

    但若直接替换可能会引起其它软件崩掉

    configure时最好用--prefix=指定下安装路径

    gimp的源码包可以在官网上下载

    ./configure --prefix=/app/gimp2.8.8出现错误

    configure: error: Package requirements (babl >= 0.1.10) were not met:

    No package 'babl' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    本来以为yum install babl就可以的,没想到出现

    Setting up Install Process
    Package babl-0.1.2-4.el6.i686 already installed and latest version
    Nothing to do

    yum的babl太旧了,看来得自己下载

    在http://www.linuxfromscratch.org/blfs/view/svn/general/babl.html下载到babl-0.1.10.tar.bz2安装很简单,./configure --prefix=/app/babl-0.1.10 && make && make install就可以了

    因为我把babl放在了/app/babl-0.1.10目录下

    所以现在需要改下PKG_CONFIG_PATH这个环境变量

    vim ~/.bash_profile

    加上 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:babl安装目录/lib/pkgconfig

          export PKG_CONFIG_PATH

    然后打开新的终端执行下 . ~/.bash_profile  

    再在这个终端重新configure刚才的gimp

    又出错了

    No package 'gegl-0.2' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefi

    还是yum中的包太老了,还得重新下载

    gegl可以在ftp://ftp.gimp.org/pub/gegl/0.2/中下载

    gegl在configure的时候也需要刚才的babl,如果不是在刚才打开的终端中执行的话,需要再 执行一次 . ~/.bash_profile

    安装gegl还会遇到需要GLib >=2.28的情况,

    去http://ftp.gnome.org/pub/GNOME/sources/glib/

    下载(最好下载最新的,),

    然后也是configure--make--make install(安装最新的要求要有libffi

    http://sourceware.org/libffi/下载)

    安装好GLib后,也要重新编辑下~/.bash_profile

    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:babl安装目录/lib/pkgconfig:glib安装目录/lib/pkgconfig

          export PKG_CONFIG_PATH

    重新configure gegl,又有新问题

    *** 'pkg-config --modversion glib-2.0' returned 2.28.8, but GLIB (2.22.5)
    *** was found! If pkg-config was correct, then it is best
    *** to remove the old version of GLib. You may also be able to fix the error
    *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
    *** /etc/ld.so.conf. Make sure you have run ldconfig if that is
    *** required on your system.
    *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
    *** to point to the correct configuration files

    这是因为系统默认有glib库,你又安装了一个版本,configure在查找时会找到两个版本,所以会产生错误

    解决方法 
    直接设置个临时变量LD_LIBRARY_PATH

    export LD_LIBRARY_PATH=你安装的glib目录/lib

    然后重新configure就行了

    接着就是make 和make install

    安装好gegl后,记得修改下PKG_CONFIG_PATH变量,不要把刚才的glib去掉,后面还要用

    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:babl安装目录/lib/pkgconfig:glib安装目录/lib/pkgconfig:gegl安装目录/lib/pkgconfig

    然后打开新的终端执行下 . ~/.bash_profile  

    之后重新configure gimp

    又来了。。。。

    Requested 'atk >= 2.2.0' but version of Atk is 1.28.0

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    继续搞atk

    可以在http://ftp.gnome.org/pub/GNOME/sources/atk/上下载

    最好下载新的,新的要求GLib要大于2.31

    如果刚才的GLib下载不高,最好重新下载,然后重装下之前的gegl

    configure-make-make install 后

    再改下 PKG_CONFIG_PATH

    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:babl安装目录/lib/pkgconfig:gegl安装目录/lib/pkgconfig:atk安装目录/lib/pkgconfig

    然后打开新的终端执行下 . ~/.bash_profile  

    继续重新configure gimp

    之后会出现又是glib重复的问题

    设置下LD_LIBRARY_PATH

    然后又出现需要GTK了。。

    http://www.gtk.org/download/linux.php

    为了防止3.X和2.X会有冲突,就下了2.X中的最高版本

    安装GTK还需要gdk-pixbuf

    http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/

    安装gdk-pixbuf又说需要libtiff

    *** Checks for TIFF loader failed. You can build without it by passing
    *** --without-libtiff to configure but some programs using GTK+ may
    *** not work properly

    虽然可以禁用,不过还是装上好了,都搞这么多了。。

    解决方法很简单了 yum install libtiff-devel

    就可以了,

    装好gdk-pixbuf后别忘了加到PKG_CONFIG_PATH中

    然后新开个终端 

    执行 .  ~/.bash_profile

             export LD_LIBRARY_PATH=glib安装目录/lib

    重新configure 下gtk就可以 make 和 make install gtk了

    然后是再把gtk加入到PKG_CONFIG_PATH中

    然后重开终端 

    执行之前那两个命令(不过这次后一个命令变成了export LD_LIBRARY_PATH=glib安装目录/lib/:gtk安装目录/lib)

    然后重新configure gimp

    如果认为这次就要搞定了,那就错了。。。

    equested 'cairo >= 1.10.2' but version of cairo is 1.8.8

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    在http://cairographics.org/releases/上下载cairo最新版本

    这个简单了configure-make-make install就可以了

    之后也是添加到PKG_CONFIG_PATH中

    然后开个新终端

    执行上面两个步骤

    。。。还是有问题 不过预感应该是最后的问题了~~

    *** We require Pango with the optional support for Cairo compiled in.
    *** See the file 'INSTALL' for more help.

    http://ftp.gnome.org/pub/GNOME/sources/pango/上下载pango

    pango需要cairo,确保configure之前执行 . ~/.bash_profile

    configure pango时会出现

    checking which cairo font backends could be used... none
    configure: Disabling cairo support
    configure: error: *** Could not enable any backends.
    *** Must have at least one backend to build Pango.

    那是因为还得装上三个东西

    harfbuzz、freetype、fontconfig

    harfbuzz可以在http://www.freedesktop.org/wiki/Software/HarfBuzz/上下载

    freetype可以在http://www.freetype.org/download.html上下载

    fontconfig可以在http://www.freedesktop.org/software/fontconfig/release/上下载

    前两个很好装,第三个有点蛋疼

    configure fontconfig是会要求有expat

    直接 yum install expat-devel就可以解决了

    然后我出现了docbook2pdf: command not found的错误

    就去http://www.linuxfromscratch.org/blfs/view/6.3/pst/docbook-utils.html上下载了docbook-utils

    尼玛 装了才发现系统中竟然有了,可是有了刚才怎么会找不到。。。

    把安装docbook-utils的bin目录下的docbook2pdf放到/usr/bin目录下

    这回docbook2pdf命令是找到了,可又出现 pdfjadetex: command not found的错误

    一开始不知到怎么解决,安装了一堆的rpm包还有一些第三方包

    可以先试试用 yum install jadetex

    不行的话在 加上 yum install tetex

    还不行的话

    去http://www.tldp.org/HOWTO/DocBook-Install/install.html照着搞搞吧

    搞这个搞的我快放弃了,最后是执行yum install jadetex解决的

    之前后面两条都搞了,就一起记下来了

    三个装好后加到PKG_CONFIG_PATH上

    然后重启终端就可以装好pango了

    然后把pango加到PKG_CONFIG_PATH中,就可以了

    重开终端后,记得 

    . ~/.bash_profile

    export LD_LIBRARY_PATH=glib安装目录/lib:gtk+安装目录/lib

    然后重新configure gimp就行了

    这回configure总算成功了。。

    之后的make -make install等一下就好了

    搞了一天,总算搞定了,还是yum爽啊
  • 相关阅读:
    spring-mvc访问本地html文件
    好文收集
    jsp参数乱码解决
    ext window嵌jsp页面自适应
    正则学习(转)
    Error occurred during initialization of VM Incompatible initial and maximum heap sizes specified
    产品测试流程
    创建maven工程时报错,解决方案
    接口测试中如何利用cookies保持会话
    http协议基础
  • 原文地址:https://www.cnblogs.com/Crysaty/p/6268480.html
Copyright © 2020-2023  润新知