【Qt】Linux启动Qt Creator时出现Could not load the Qt platform plugin “xcb“ in ““ even though it was found问题

今天在Ubuntu 20.04安装了Qt后

启动 qtcreator时,出现如下报错:

~ $ 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

到处查找解决方案,发现
输入指令:

sudo apt-get install libxcb*

安装完成后,启动qtcreator成功!


解决方案来自:
https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用和提供了关于Qt平台插件加载错误的信息。"qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found"这个错误表示Qt无法加载xcb平台插件,尽管该插件已经找到。这种情况通常发生在缺少依赖库或库版本不匹配的情况下。 引用提供了一个具体的错误信息,指出缺少"libQt5XcbQpa.so.5"库的Qt_5_PRIVATE_API版本。这可能意味着您的系统上安装的Qt版本与应用程序依赖的版本不匹配。 解决这个问题的步骤如下: 1. 确保您的系统上安装了正确的Qt版本。您可以使用`qmake -v`命令来检查当前安装的Qt版本。 2. 确保您的系统上安装了xcb平台插件所需的依赖库。在Ubuntu系统上,您可以使用以下命令安装所需的软件包:`sudo apt-get install libxcb-xinerama0`和`sudo apt-get install libxcb-xkb1`。 3. 如果您使用的是Anaconda环境,请确保您的环境中安装了正确的Qt版本。您可以使用`conda list`命令来查看已安装的软件包列表。 4. 如果问题仍然存在,尝试重新安装Qt CreatorQt框架来解决依赖库版本不匹配的问题。在重新安装之前,确保卸载现有的Qt CreatorQt框架。 5. 如果您使用的是Linux系统,请确保您的LD_LIBRARY_PATH环境变量正确设置,并且指向正确的Qt库目录。 通过按照上述步骤检查和解决问题,您应该能够解决"qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found"错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [qt.qpa.plugin: Could not load the Qt platform pluginxcb“ in ““ even though it was found.](https://blog.csdn.net/qq_39429669/article/details/122258468)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值