Centos6.6 install Qt4.8.6 + QtCreator2.6.1
1. Installation Package
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 777qt-creator-linux-x86_64-opensource-2.6.1.bin and set the permission. (2) enter the command line. /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). decompress the compressed package tar -xzvfqt-everywhere-opensource-src-4.8.6.tar.gz; (2) and enter the decompressed folder. /configure, configure the Qt installation details. Note: if the following error occurs during installation, run: yuminstalllibX *
BasicXLibfunctionalitytestfailed!
Qt-x11/home/zhu/Qt/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.