Problems with qt4 installation in centos

Source: Internet
Author: User

In a recent project, we need to keep Windows software under Linux. We have been working on Windows programs before. Although I have learned about Linux, I forgot about it,

So I started my research on Linux. I hope everyone with this experience can exchange ideas.

When you want to install a QT library on centos today, download the source code .. /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 ++ errors.
I checked it online and found it was a classic error. However, basically all the solutions provided on the Internet are ubantu, which makes people very rogue. The conclusion is that the libX11-dev libxext-dev libxtst-dev file is missing.
The following describes how to find the cause on the Internet:

Run the make command in config. Test/X11/xlib to check the error message.
G ++-wl,-O1-O xlib. O-L/usr/x11r6/lib-lxext-lx11-LM
/Usr/bin/ld: cannot find-lxext
See it. in/usr/x11r6/lib, The libxext. So cannot be found in G ++.
The reason is the need to install libx11 development kit, in Ubuntu/Debian package name is libX11-dev
Based on past experience, you can install the following three packages before./configure, which means everything is fine.
Sudo apt-Get install libX11-dev libxext-dev libxtst-Dev"

However, centos and ubantu calculate two different series of commands and software. The three packages were not found when the yum install installation libX11-dev libxext-dev libxtst-Dev.
However, these three packages belong to libx11, so I searched for them using Yum install libx11 * and found many. So I checked the bag one by one and found that there were three corresponding ones,
Are: libX11-devel, libxext-devel, libxtst-devel. I guess the RedHat series Linux should use these three packages, so after the three packages are installed, the above problems did not occur again. Install the qt4 library smoothly.
In addition, you can see the XXX-dev package on ubantu in the future. There should be a XXX-devel package on centos.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.