linux上安装qt creator

linux上安装Qt Creator

1 Qt Creator 的下载

下载地址为:http://download.qt.io/archive/qt/

根据自己的需求选择Qt Creator版本,这里我下载的是5.12.9,如下图所示:

image-20231031174559032

在ubuntu上可以使用wget命令下载安装包:

wget https://download.qt.io/archive/qt/5.12/5.12.9/qt-opensource-linux-x64-5.12.9.run

2 Qt Creator 的安装

2.1 给安装包添加执行权限

输入下面命令给安装包添加执行权限。

sudo chmod +x qt-opensource-linux-x64-5.12.9.run

image-20231031212519148

2.2 Qt Creator的安装

输入以下命令进行Qt Creator安装,默认会将qt安装在/opt目录下

sudo ./qt-opensource-linux-x64-5.12.9.run

出现下面这种错误:是由于我在vscode编辑器中安装qt遇到的,直接在Ubuntu上执行,就条命令

image-20231031212645204

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, xcb.

Aborted

执行上面的命令会出现如下画面,基本上就是一路next就可以了。

image-20231120142158980

会要求你选择的组件,这里我是如下选择,(大家根据自己的需要选择)

image-20231120142307655

中间过程可能需要,登录qt的账号和密码,断网,就可以解决了,其他按照提示来就可以了。

到此就完成了qt_creator的安装。

2.3 运行qtcreator

在终端上进入到/opt/Qt5.12.9/Tools/Qtcreator/bin目录下,执行下面命令

./qtcreator

稍等一会就可以看到qtcreator的画面了。

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值