ubuntu 安装 Qt4.8.6
step 1 安装依赖库,在安装说明的最下面
-
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
step 2 下载安装包:
http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz
step 3 解压 解包
- gunzip qt-everywhere-opensource-src-4.8.6.tar.gz # uncompress the archive
- tar xvf qt-everywhere-opensource-src-4.8.6.tar # unpack it
step 4 配置生成MakeFile
- ./configure
step 5 构建
make -j8 #多线程编译
step 6 安装
sudo make install
step 7 配置环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/Trolltech/Qt-
4.8
.
6
/bin