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.