Ubuntu 22.04 解决 使用 Qt报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even...

Posted LiQiang33

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 22.04 解决 使用 Qt报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even...相关的知识,希望对你有一定的参考价值。

文章目录

1 原因

使用 Qt 时报错,原因是缺少相应的库

具体报错信息:

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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

2 解决

安装:libxcb-xinerama0

sudo apt install libxcb-xinerama0

运行Qt的问题解决了

网上还有其他的一些方式,遇到的情况不一样,解决的方式也不一样,仅供参考!


参考

PyQt5:解决qt.qpa.plugin: Could not load the Qt platform plugin "xcb"错误 https://www.jianshu.com/p/b51008566134

以上是关于Ubuntu 22.04 解决 使用 Qt报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even...的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file

Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file

Docker运行ubuntu22.04出现异常

Docker运行ubuntu22.04出现异常

Docker运行ubuntu22.04出现异常

系统篇:ubuntu 22.04 iptables 运行失败解决方法