1、下载 qt-everywhere-opensource-src-4.8.6
2、解压qt-everywhere-opensource-src-4.8.6
# tar zxvf qt-everywhere-opensource-src-4.8.6
#cd qt-everywhere-opensource-src-4.8.6
3、有时,Linux/CentOS系统没有g++包或g++的部分包,请在终端输入如下命令:
# yum install libX*
4、编译时会出现了个问题:ERROR: Package gstreamer-app-0.10 not found,先执行命令:
# yum install gstreamer-plugins-base-devel
5、执行./configure 工具
# ./configure
在选项中选o(开源源代码,非商业的)。
在输入yes。
6、编译
# gmake
(大概需要4-5个小时)
7、安装
# gmake install
8、设置环境变量
# vim /etc/profile
在最后添加:
export PATH=$PATH:/usr/local/Trolltech/Qt-4.8.6/bin
#source /etc/profile
9、测试
# cd /usr/local/Trolltech/Qt-4.8.6/bin
# ./designer
也可以在图形见面下: