The installation of CentOS qt4.8

The process of recording to install qt4.8 under CentOS:

(it is advisable to install, Chinese may be unable to correctly Chinese font in the English system language environment)

Install the necessary environment 1

The installation of GCC and g++:

[root@localhost local]# yum install gcc
[root@localhost local]# yum install gcc-c++


Install Xlib:

[root@localhost local]# yum install libX11-devel libXext-devel libXtst-devel

2 download QT

The official website to download the address: .

CentOS installation options

3 QT will download decompress

[root@localhost local]# tar zxvf qt-everywhere-opensource-src-4.8.5.tar.gz

The 4 configuration

[root@localhost local]# ./configure --prefix=/usr/local

I choose to install the /usr/local, the final configuration environment remember replaced they install directory.

5 compile, run

This step may take a relatively long time, patience

[root@localhost local]# gmake
[root@localhost local]# gmake install

6 install, configure the environment variables

The installation path to environmental variables

[root@localhost local]# vim /etc/profile
Add the following content:

#ADD QT4.8.5 PATH
PATH=/usr/local/bin:$PATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTTRC
The configuration effect

[root@localhost bin]# source /etc/profile

7 successful configuration! Open the QT interface programming´╝ü

Enter the QT installation directory under the /bin folder, execution

[root@localhost bin]# ./designer





Posted by Eudora at September 29, 2014 - 10:34 PM