Centos6.6 install Qt4.8.6 + QtCreator2.6.1

Source: Internet
Author: User
1. installation packages http://download.qt.io/official_releases/qt/4.8/4.8.6/http://download.qt.io/official_releases/qtcreator/2.6/2.6.1/ 1. installation packages

 

Http://download.qt.io/official_releases/qt/4.8/4.8.6/

 

Http://download.qt.io/official_releases/qtcreator/2.6/2.6.1/

Because my operating system is 64-bit, the 64-bit version is installed.

 

2. install QtCreator2.6.1 (1) in the same directory as the file, first chmod 777 qt-creator-linux-x86_64-opensource-2.6.1.bin, set permissions; (2) enter command line input. /qt-creator-linux-x86_64-opensource-2.6.1.bin installation, after installation is complete, the directory/usr/local/qtcreator2.6.1 appears. 3. install Qt4.8.6 (1) first extract the compressed package: tar-xzvf qt-everywhere-opensource-src-4.8.6.tar.gz; (2) then enter the decompressed folder and execute. /configure, configure the Qt installation details. note: if the following error occurs during installation, run: yum install libX *

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.8.6/mkspecs/linux-g ++

Then execute./configure;

(3) at last, execute make & make install as administrator to compile the source file. The time is about two and a half hours. depending on the specific computer performance.

 

4. add environment variables

Enter vi ~ on the terminal ~ /. Bash_profile: Enter the file and add the following lines at the end of the. bash_profile file.

Export QTDIR =/usr/local/Trolltech/Qt-4.8.6
Export PATH = $ QTDIR/bin: $ PATH
Export MANPATH = $ QTDIR/man: $ MANPAT
Export LD_LIBRARY_PATH = $ QTDIR/lib: $ LD_LIBRARY_PATH

To make the configuration take effect immediately, you need to log out of the current user, log on again, or tap the Command source ~ on the terminal ~ /. Bash_profile.

 

5. select tools> options> Build and Run to configure QtCreator. (1) index qmake (2) add the Qt version configuration to run properly.

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.