Record the process of installing qt48 in CentOS: (it is best to install it in an English system language environment, and the Chinese character may be incorrect.) 1 installation
Record the process of installing qt4.8 in CentOS:
(It is best to install it in an English system language environment. Chinese characters may be incorrectly formatted)
1. install the required environment
Install 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
Official website: http://qt-project.org/downloads.
CentOS installation and selection
- Qt libraries 4.8.5 for Linux/X11 (230 MB) (Info) 3. decompress the downloaded qt
[root@localhost local]# tar zxvf qt-everywhere-opensource-src-4.8.5.tar.gz
4. configure[root@localhost local]# ./configure --prefix=/usr/local
I chose to install it in/usr/local. when configuring the environment, remember to change it to your own directory.
5. compile and run
This step may take a long time and requires patience.
[root@localhost local]# gmake
[root@localhost local]# gmake install
6. the installation is successful and environment variables are configured.Write the installation path to the environment variable
[root@localhost local]# vim /etc/profile
Add the following content:#ADD QT4.8.5 PATHPATH=/usr/local/bin:$PATHexport PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTTRC
Make the configuration take effect[root@localhost bin]# source /etc/profile
7. the configuration is successful! Open the qt interface for programming!Go to the qt installation directory/bin folder and run
[root@localhost bin]# ./designer