qt5解决This application failed to start because it could not find or load the Qt platform plugin "xc

pyqt5解决This application failed to start because it could not find or load the Qt platform plugin “xcb”.

bug提示信息

This application failed to start because it could not find or load the Qt platform plugin “xcb”.
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem. Aborted (core dumped)

问题定位

  1. 定位xcb的路径,通过ldd指令查看xcb库的依赖库状况。这里我们在执行 ldd ~/miniconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so出现了一条信息:

    libxkbcommon-x11.so.0 => not found

20191126034007.png

问题原因

Qt-5.12.1更新日志中描述:xkbcommon库被移除,因为基本所以的平台中都默认有这个库了。

[QTBUG-65503] Removed xkbcommon from bundled sources. This library is present on all supported platforms. The minimal required version now is 0.5.0.

解决方案

手动安装libxkbcommon-x11.so.0库即可。
在这里提供ubuntu系统对应的安装指令: sudo apt-get install libxkbcommon-x11-0.

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值