QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1274|回复: 1

gtk安装不成功,提示libx11 not found?

[复制链接]
发表于 2005-11-20 20:58:55 | 显示全部楼层 |阅读模式
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自由精神回答一下,哪怕是一个提示,我就很快会主动去找到答案,谢谢!
 楼主| 发表于 2005-11-20 22:06:03 | 显示全部楼层
补充,这个俺有的,并设置在了/etc/ld.so.conf中

[root@rh9bk lib]# ls /usr/X11R6/lib/libX11.*
/usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libX11.so.6.2
还有XFree86已有
[root@rh9bk lib]# XFree86 -version

XFree86 Version 4.3.0 (Red Hat Linux release: 4.3.0-2)
Release Date: 27 February 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.20-3bigmem i686 [ELF]
Build Date: 27 February 2003
Build Host: porky.devel.redhat.com

Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.4.20-8 ([email protected]) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-29 00:47 , Processed in 0.044975 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表