|
os是redhat9.0 内核2.4.20-8,gcc是3.2.2
首先我从ftp://ftp.gtk.org下载了所有gtk依赖的包,然后一一安装依赖包
atk-1.9.0.tar.gz glib-2.8.4.tar.gz pango-1.10.1.tar.gz
cairo-1.0.2.tar.gz gtk+-2.8.7.tar.gz pkgconfig-0.15.0.tar.gz
fontconfig-2.3.2.tar.gz jpegsrc.v6b.tar.gz tiff-3.7.4.tar.gz
freetype-2.1.10.tar.gz libpng-1.2.8-config.tar.gz
最后安装gtk时,错误提示1,如下
checking for FONTCONFIG... Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
configure: WARNING: No fontconfig found, skipping tests for FreeType and Xft
checking for CAIRO... Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
configure: error: *** Didn't find any of FreeType, X11, or Win32.
*** Must have at least one backend to build Pango.
安装了freetype和fontconfig
fontconfig.pc其实已经在/usr/local/lib/pkgconfig下了,但系统没有设置路径,导致找不到,之后再安装pango并设置了如下:
1.find / -type d -name pkgconfig
在/usr/local/lib/pkgconfig下找到所需的xxx.pc 文件
2.在~/.bashrc下把找到的添加进去,
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
#pkg-config --list-all
#echo "/usr/local/lib" >>/etc/ld.so.conf;ldconfig
可找到软件freetype和fontconfig包了
可再安装gtk,又提示发现两个版本的glib,要我删除低版本的glib,我只好用 rpm -e glib --nodeps强制卸载后,结果还是一样的提示,没办法,我只好重新安装glib,并指定了目录为/usr
./configure --FIXPRE=/usr,这样就通过了glib的安装
但又提示,configure: error: X development libraries not found
我晕死,指定x的库位置,可通过检查./configure --x-includes=/usr/X11R6/includes --x-libraries=/usr/X11R6/lib --without-libjpeg
继续错误
checking for IceConnectionNumber in -lICE... no
checking for XOpenDisplay... no
configure: error: *** libX11 not found. Check 'config.log' for more details.
就是这个libX11没找到的错误!
现在再也想不到方法,看了很多国外的帖子,也没什么解决方法.,去了各个论坛和linux网站,看到也有人碰到过这问题,解答如下:
You need to install the development libraries. To compile a wxWidgets
program you need libwxbase2.4-dev, libwxbase2.4-dev, and
libwxgtk2.4-contrib-dev (for a wx2.4 program) or libwxgtk2.6-dev (for a
wx2.6 program). For an X11 program you need x-window-system-dev, which
should pull in all the dependencies you need.
我看了这些都是debain的二进制包,和redhat没关系
问题总结:
1.pkg-config的完整配置方法怎么样设置?配置PKG_CONFIG_PATH在环境变量里就可以了吗?还有/etc/ld.so.conf增加libaray路径
2.libX11是什么?怎么安装,配置?到哪里去下载?
请各位本着GNU自由精神回答一下,哪怕是一个提示,我就很快会主动去找到答案,谢谢! |
|