ubuntu20.04Qt6.2.4更新组件后点击图标无法启动(已解决)

问题描述

在编译一个qt项目时死活找不到教程中的一个功能,同时qt软件提示组件更新可用,于是手贱点了一下更新,更新的包括cmake之类的。

软件重启过后点击图标无反应,进入qt中的可执行文件目录

/home/liu/Qt/Tools/QtCreator/bin

使用.命令运行

./qtcreator

报错如下

liu@ljn:~/Qt/Tools/QtCreator/bin$ ./qtcreator
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: wayland, vnc, wayland-egl, xcb, eglfs, offscreen, linuxfb, minimal, vkkhrdisplay, minimalegl.

已放弃 (核心已转储)

尝试重启系统,无效;

使用MaintenanceTool卸载当前版本,再重新安装相同版本,无效;

qt社区中相同报错解决方案

sudo apt-get install libxcb-xinerama0

显示已是最新版本,无效;

问题解决

卸载当前版本,安装最新版本qt6.6.1,仍无法打开,但是

sudo apt install libxcb-cursor0

之后软件成功打开

问题总结

最新版本能运行的原因貌似是Qt 6.4.0以前不需要libxcb-cursor.so.0,但之后需要。

详细链接如下:c++ - QT6: "qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found." - Stack Overflow

最后,不要点更新按钮,会变得不幸。

  • 11
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值