centos下的photoshop的替代软件gimp过程,软件依赖坑多

最近我想在centos系统中安装个画图的软件,最后选择gimp,高高兴兴的我的通宵之旅。

 

我这儿使用的系统版本是:

CentOS Linux release 7.3.1611

Linux masterhost 3.10.0-514.el7.x86_64

先从官网中下载source

软件版本是:2.8.22

1、首先是解压

gimp-2.8.22.tar.bz2

2、在解压文件夹里面使用

./configure

出现以下问题:

checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for recommended xgettext version (>= 0.19)... no
checking for iso-codes... no (iso-codes package not found)
checking for BABL... no
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.

Alternatively, you may set the environment variables BABL_CFLAGS
and BABL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

3、因为上面说需要babl,所以我用yum安装babl

sudo yum install babl

4、完成之后继续使用

./configure

又出现以下问题:

checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for recommended xgettext version (>= 0.19)... no
checking for iso-codes... no (iso-codes package not found)
checking for BABL... no
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.

Alternatively, you may set the environment variables BABL_CFLAGS
and BABL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

5、这儿怎么还有这个问题呢,我这儿注意到下面,原来缺少环境变量PKG_CONFIG_PATH

执行命令:sudo vim /etc/profile

找个位置添加: export PKG_CONFIG_PATH=/usr/lib64/pkgconfig  

后面的只/usr/lib64/pkgconfig按照你的电脑来配置。

如果你找不到,可以通过系统位数来知道,我的是64位,所以lib64,32就是lib,可以进pkgconfig文件里面看,如果是正确的那里面的.pc结尾的文件很多。

最后执行source /etc/profile

6、继续执行

./configure

这次出现错误换了个

checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.16.3
checking for XML::Parser... ok
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for recommended xgettext version (>= 0.19)... no
checking for iso-codes... no (iso-codes package not found)
checking for BABL... yes
checking for GEGL... no
configure: error: Package requirements (gegl-0.2 >= 0.2.0) were not met:

No package 'gegl-0.2' found

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

Alternatively, you may set the environment variables GEGL_CFLAGS
and GEGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

7、上面缺少gegl软件,那么就安装

sudo yum install gegl

8、继续执行

./configure

这次出现错误换了个

checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for recommended xgettext version (>= 0.19)... no
checking for iso-codes... no (iso-codes package not found)
checking for BABL... yes
checking for GEGL... yes
checking for ATK... no
configure: error: Package requirements (atk >= 2.2.0) were not met:

No package 'atk' found

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

Alternatively, you may set the environment variables ATK_CFLAGS

9、上面说明缺少atk软件,那么就安装

sudo yum install atk

10、继续执行

./configure

这次出现错误换了个

checking for BABL... yes
checking for GEGL... yes
checking for ATK... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.30.2... yes (version 2.54.2)
checking for GMODULE_NO_EXPORT... yes
checking for GIO... yes
checking if GLib is version 2.31.0 or newer... yes
checking for bind_textdomain_codeset... (cached) yes
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GTK+ - version >= 2.24.10... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.

11、上面看,好吧,有时gtk+,但是gtk+我有的,那么就是版本问题,在yum源中我的已经是最新的了,只有从官网中下载源码了。

下载地址http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/

我下载的 gtk+-2.24.10.tar.xz

解压,./configure,又出问题了

checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BASE_DEPENDENCIES... no
configure: error: Package requirements (glib-2.0 >= 2.27.3    atk >= 1.29.2    pango >= 1.20    cairo >= 1.6    gdk-pixbuf-2.0 >= 2.21.0) were not met:

No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'gdk-pixbuf-2.0' found

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

Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

我也是醉了,这么多,好吧,为了写这个博客我忍了。

12、通过查询软件配置,我的软件版本都是满足的,最后只有一个了,就是对应的下面几个错误了:

No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'gdk-pixbuf-2.0' found

这儿没有找到应该是需要对应的devel版本,所以我又执行了

sudo yum install atk-devel.x86_64

sudo yum install pango-devel.x86_64

sudo yum install cairo-devel.i686

sudo yum install gdk-pixbuf2-devel.x86_64

sudo yum install cairo-gobject-devel.x86_64

sudo yum install libepoxy*

13、上面完成了,再来安装gtk+-2.24.10.tar.xz

./configure

make && make install

In file included from updateiconcache.c:56:0:
gtkiconcachevalidator.c: 在函数‘check_pixel_data’中:
gtkiconcachevalidator.c:166:7: 错误:未知的类型名‘GdkPixdata’
       GdkPixdata data; 
       ^
gtkiconcachevalidator.c:168:7: 警告:隐式声明函数‘gdk_pixdata_deserialize’ [-Wimplicit-function-declaration]
       check ("pixel data", gdk_pixdata_deserialize (&data, length,
       ^
updateiconcache.c: 在文件作用域:
updateiconcache.c:168:3: 错误:未知的类型名‘GdkPixdata’
   GdkPixdata pixdata;
   ^
updateiconcache.c: 在函数‘maybe_cache_image_data’中:
updateiconcache.c:476:7: 错误:未知的类型名‘GdkPixbuf’
       GdkPixbuf *pixbuf;
       ^
updateiconcache.c:515:4: 警告:隐式声明函数‘gdk_pixbuf_new_from_file’ [-Wimplicit-function-declaration]
    pixbuf = gdk_pixbuf_new_from_file (path, NULL);
    ^
updateiconcache.c:515:11: 警告:赋值时将整数赋给指针,未作类型转换 [默认启用]
    pixbuf = gdk_pixbuf_new_from_file (path, NULL);
           ^
updateiconcache.c:519:8: 警告:隐式声明函数‘gdk_pixdata_from_pixbuf’ [-Wimplicit-function-declaration]
        gdk_pixdata_from_pixbuf (&idata->pixdata, pixbuf, FALSE);
        ^
updateiconcache.c:520:36: 错误:在非结构或联合中请求成员‘length’
        idata->size = idata->pixdata.length + 8;
                                    ^
updateiconcache.c: 在函数‘write_image_data’中:
updateiconcache.c:806:3: 错误:未知的类型名‘GdkPixdata’
   GdkPixdata *pixdata = &image_data->pixdata;
   ^
updateiconcache.c:812:3: 警告:隐式声明函数‘gdk_pixdata_serialize’ [-Wimplicit-function-declaration]
   s = gdk_pixdata_serialize (pixdata, &len);
   ^
updateiconcache.c:812:5: 警告:赋值时将整数赋给指针,未作类型转换 [默认启用]
   s = gdk_pixdata_serialize (pixdata, &len);

这儿编译错误,我已经崩溃了,我查找了Gdk-pixbuf2安装了,而且没有报gdk-pixbuf/gdk-pixdata.h不存在,说明系统没有问题,我怕多安装了,多了同名的.h,我还去找了,没有同名的。我去gtk的讨论那儿看能不能找到有关的bug,但是没有。gtk讨论的地址https://gitlab.gnome.org/GNOME/gtk/issues

现在是第二天的6点钟,也是2018年9月13日 6点,我已经一个通宵了,还是没有找到问题,我放弃了。那位搞linux开发的大牛,知道gtk怎么安装的留言告知一下,万分感谢。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值