mac编写的qt程序 在windows中报错_Linux系统安装及对应系统的Qt安装(32位老系统)...

本文档详细介绍了如何在32位Ubuntu 14.04系统上安装Qt 5.0.0,并解决安装后的Permission denied问题。此外,还涉及到设置镜像源加速下载,安装g++编译器以及配置Qt环境的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

需求:32位安全计算机跑对应的程序

来源:全部是网络

Linux的安装

虚拟机:VMare 16(虚拟机跑的是12的核)

Linux 版本 14.04.06

 .04好像都是32位的,目前官网接近绝迹,曾经用16.04.06,安装完Qt有莫名奇妙的错误无法解决

Linux的安装按部就班,网上资源丰富,要注意设置高级自定义安装,同时断网,据我所知16.04的版本竟然是在官网上又下载了东西

Qt的安装

版本名字:qt-linux-opensource-5.0.0-x86-offline.run

目前也是接近于绝迹, x86 means 32位

方法:cd 源目录,sudo chmod -R 777 qt.....,

sudo ./qt....开始安装

安装完成后运行,可能会出现 Permission denied的报错,建议先重启,如果还是不行,需要chmod改权限,我当初改的已经找不到了,不过权限不能随便改,像include lib这些改了以后系统就很容易崩了

Qt环境的配置

首先,设置镜像源,否则下载速度奇慢无比。但是网上敲代码的还没有搞太懂,采用以下方式

系统设置-软件和更新-源代码

ca176450518dcf13edbf9d108a8a1935.png

然后,安包包

sudo apt-get install g++ sudo apt-get install libgl1-mesa-dev libglu1-mesa-de

接下来对这句话进行“翻译”

apt-get 家族

sudo apt-get install XXXsudo apt-get install -y XXXsudo apt-get install -q XXXsudo apt-get remove XXXsudo apt-get purge XXXsudo apt-get autoremovesudo apt-get updatesudo apt-get upgrade

记得一开始忘记敲install,报错....

打开/etc/apt/source.list

cat /etc/apt/sources.list  deb http://security.ubuntu.com/ubuntu trusty-security main restricteddeb-src http://security.ubuntu.com/ubuntu trusty-security main restricteddeb http://security.ubuntu.com/ubuntu trusty-security universedeb-src http://security.ubuntu.com/ubuntu trusty-security universedeb http://security.ubuntu.com/ubuntu trusty-security multiversedeb-src http://security.ubuntu.com/ubuntu trusty-security multiversedeb http://extras.ubuntu.com/ubuntu trusty maindeb-src http://extras.ubuntu.com/ubuntu trusty maindeb http://us.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted multiverse universe

安装软件

Reading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following packages were automatically installed and are no longer required:account-plugin-windows-live libblas3 libbonobo2-0 libbonobo2-commonlibbonoboui2-common libglade2-0 libgnomecanvas2-0 libgnomecanvas2-commonlibgnomeui-common libidl-common libidl0 libisl10 liblinear-tools liblinear1libllvm3.5 libntdb1 liborbit-2-0 liborbit2 libupstart1linux-headers-3.16.0-30 linux-headers-3.16.0-30-genericlinux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-genericUse 'apt-get autoremove' to remove them.The following extra packages will be installed:libdiodon0 libunique-3.0-0Suggested packages:diodon-pluginsThe following NEW packages will be installed:diodon libdiodon0 libunique-3.0-00 upgraded, 3 newly installed, 0 to remove and 221 not upgraded.Need to get 272 kB of archives.After this operation, 1,348 kB of additional disk space will be used.Do you want to continue? [Y/n]

先是reading,在网站列表里面查,然后就是查相互依赖的包 ,安装

g++

搞懂这个得先默认搞懂IDE和编译,g++是真正编译C++的东西,把他编译成2进制的机器能懂的,之前的VS就是内置了编译系统。

另外gcc对应c,这两个linux系统用的多,win系统一般是msvc, mac是clang

一点疑惑

libgl1-mesa-dev libglu1-mesa-de

关于这两个文件,说实话我也不懂,网上资源廖廖,如果有高人的希望指点一二。

最后在Qt程序里面添加上这个编译器就好了!万事大吉,成功不报错跑项目,然而,这只是个开始……

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值