Ubuntu14.04如何安装低版本Qt,如4.8.1

准备工作

sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designer

 

sudo apt-get install libfontconfig*

 

1:下载Qt 4.8.1安装包,自行百度

 

 下载下来的应该是:qt-everywhere-opensource-src-4.8.1.tar.gz

2:拷贝文件到自己想要解压的目录下,再进行解压

tar zxvf qt-everywhere-opensource-src-4.8.1.tar.gz

3:进入解压目录后,进行配置

./configure

配置过程中会有提示:

Which edition of Qt do you want to use ?Type 'c' if you want to use the Commercial Edition.Type 'o' if you want to use the Open Source Edition.

选择o,

接下来还有提示:

This is the Open Source Edition.You are licensed to use this software under the terms ofthe Lesser GNU General Public License (LGPL) versions 2.1.You are also licensed to use this software under the terms ofthe GNU General Public License (GPL) versions 3.Type '3' to view the GNU General Public License version 3.Type 'L' to view the Lesser GNU General Public License version 2.1.Type 'yes' to accept this license offer.Type 'no' to decline this license offer.Do you accept the terms of either license?

输入yes

,然后回车。等待几分钟,会生成Makefile文件, 配置完后执行make就可以了。 

编译完成后,执行

sudo make install

这样会安装到/usr/local/Trolltech/Qt-4.8.1目录下。

运行Qt Creator,在标题栏“工具”的“选项”中添加qmake路径

参考自https://www.aliyun.com/jiaocheng/173020.html

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值