Basic XLib functionality test failed! 解决方法

   在做QT在虚拟机fedora上的安装的时候

 

做的这一步的时候出现错误

此完整出错信息是在./configure阶段
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

在网上查了很多资料,大家众说纷纭,不过最多的一种说法是libX11有关的库不全。

按照网上的方法尝试:

安装 libX11-dev libXext-dev libXtst-dev

 (在网上有的说用sudo等指令的,其实那个不适合fedora,在fedora下用yum install)

yum install libX11-dev

显示没有找到相应的package

而且输入yum install llibXext-dev也不行

 输入yum install libXtst-dev也不行

三个库文件都是显示有问题。

 

自己想一想,可能不同的linux发行版,所对应的库文件名字不同吧。

好吧,索性全部安装上。

yum install libX*

安好了在./configura

错误依旧,难道是网上说错了,还是我压根没安装上,先从自己找原因

yum  命令更新文件,更新包全部都在,/var/cache/yum/fedora/packages
找到这里果然发现很多的rpm包

atk-devel-1.22.0-1.fc9.i386.rpm
cairo-devel-1.6.4-1.fc9.i386.rpm
docbook-dtds-1.0-35.fc9.noarch.rpm
docbook-style-dsssl-1.79-5.fc9.noarch.rpm
docbook-style-xsl-1.73.2-9.fc9.noarch.rpm
docbook-utils-0.6.14-13.fc9.noarch.rpm
fontconfig-devel-2.5.0-2.fc9.i386.rpm
freetype-devel-2.3.5-4.fc9.i386.rpm
gc-7.0-7.fc9.i386.rpm
glib2-devel-2.16.3-5.fc9.i386.rpm
glibmm24-devel-2.16.0-1.fc9.i386.rpm
gtk2-devel-2.12.9-5.fc9.i386.rpm
gtk-doc-1.9-4.fc9.noarch.rpm
libgcrypt-devel-1.4.0-3.i386.rpm
libgpg-error-devel-1.6-2.i386.rpm
libpng-devel-1.2.24-1.fc9.i386.rpm
libsigc++20-devel-2.2.2-1.fc9.i386.rpm
libxcb-doc-1.1-4.fc9.i386.rpm
libXcomposite-devel-0.4.0-4.fc9.i386.rpm
libXcursor-devel-1.1.9-2.fc9.i386.rpm
libXext-devel-1.0.4-1.fc9.i386.rpm
libxfce4mcs-4.4.2-2.fc9.i386.rpm
libxfce4mcs-devel-4.4.2-2.fc9.i386.rpm
libxfce4util-4.4.2-2.fc9.i386.rpm
libxfce4util-devel-4.4.2-2.fc9.i386.rpm
libxfcegui4-4.4.2-2.fc9.i386.rpm
libxfcegui4-devel-4.4.2-2.fc9.i386.rpm
libXfixes-devel-4.0.3-3.fc9.i386.rpm
libXft-devel-2.1.12-5.fc9.i386.rpm
libXi-devel-1.1.3-4.fc9.i386.rpm
libXinerama-devel-1.0.3-1.fc9.i386.rpm
libxkbfile-devel-1.0.4-5.fc9.i386.rpm
libxklavier-devel-3.5-1.fc9.i386.rpm
libxml-1.8.17-19.fc9.i386.rpm
libxml++-2.22.0-1.fc9.i386.rpm
libxml2-devel-2.6.32-1.fc9.i386.rpm
libxml-devel-1.8.17-19.fc9.i386.rpm
libxml++-devel-2.22.0-1.fc9.i386.rpm
libXrandr-devel-1.2.2-3.fc9.i386.rpm
libXrender-devel-0.9.4-3.fc9.i386.rpm
libxslt-devel-1.1.23-3.fc9.i386.rpm
libxslt-python-1.1.23-3.fc9.i386.rpm
openjade-1.3.2-31.fc9.i386.rpm
opensp-1.5.2-7.fc9.i386.rpm
pango-devel-1.20.1-1.fc9.i386.rpm
perl-Compress-Raw-Zlib-2.008-20.fc9.i386.rpm
perl-Compress-Zlib-2.008-20.fc9.i386.rpm
perl-HTML-Parser-3.56-5.fc9.i386.rpm
perl-HTML-Tagset-3.10-8.fc9.noarch.rpm
perl-IO-Compress-Base-2.008-20.fc9.i386.rpm
perl-IO-Compress-Zlib-2.008-20.fc9.i386.rpm
perl-libwww-perl-5.808-7.fc9.noarch.rpm
perl-SGMLSpm-1.03ii-18.fc9.noarch.rpm
perl-XML-Parser-2.36-3.fc9.i386.rpm
pixman-devel-0.10.0-1.fc9.i386.rpm
sgml-common-0.6.3-23.fc9.noarch.rpm
w3m-0.5.2-10.fc9.i386.rpm
zlib-devel-1.2.3-18.fc9.i386.rpm
 

从里面找果然找到了libX11-devel-1.1.4-1.fc9.i386.rpm   libXext-devel-1.0.4-1.fc9.i386.rpm
看来他还真没有安装上,好吧自己手动安装。

rpm  -ivh libX11-devel-1.1.4-1.fc9.i386.rpm

这时候显示 需要libxau-devel

于是
yum install libXau-devel

接着执行
rpm  -ivh libXext-devel-1.0.4-1.fc9.i386.rpm

最后,./configura果然,错误解决了。

最后我们来总结一下,要解决这个问题只需要几个库就可以了呢,

实际上只要两个:

yum install libXau-devel

执行完上面这条语句后,我在执行

yum install ibX11-devel

打印信息显示,该package已经安装

最后在安装

libXext-devel就可以了。

你可能感兴趣的:(QT移植,basic,library,include,search,虚拟机,linux)