[Share Experiences] 使用Qt报错
Tofloor
default avatar
zousl
deepin
2021-08-20 08:16
Author

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.

 

安装最新版本的系统后  运行简单的demo文件 会报qt的错误, 有执行过sudo apt-get install libxcb-xinerama0  不起作用 有没有大佬有解决过的提供个方案 谢谢了

Reply Favorite View the author
All Replies
忘记、过去
deepin
2021-08-20 08:48
#1
sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

这样子试试看?

Reply View the author
gfdgd_xi
deepin
Ecological co-builder
2021-08-20 09:17
#2

https://blog.csdn.net/weixin_46403483/article/details/119454454

sudo apt install -qq libglu1-mesa-dev libx11-xcb-dev '^libxcb*'

这样行不行?

Reply View the author
houyawei
deepin
2021-08-20 09:46
#3

大概率就是一楼说的解决方案了,我半个月前新装的系统也是同样的问题。https://blog.csdn.net/u011738895/article/details/119109788?spm=1001.2014.3001.5501

Reply View the author
zousl
deepin
2021-08-20 20:28
#4
忘记、过去
sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

这样子试试看?

你的这个法子成功了  可是为什么啊? 我这边报错是这个

 

QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 无法打开共享对象文件: 没有那个文件或目录)"

/usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so  这个 我的目录下有

Reply View the author
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2021-08-21 08:31
#5
zousl

你的这个法子成功了  可是为什么啊? 我这边报错是这个

 

QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-util.so.1: 无法打开共享对象文件: 没有那个文件或目录)"

/usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforms/libqxcb.so  这个 我的目录下有

你是不是用的pycharm?没有勾选使用外部库吧?

Reply View the author
zousl
deepin
2021-08-25 20:14
#6
gfdgd_xi

https://blog.csdn.net/weixin_46403483/article/details/119454454

sudo apt install -qq libglu1-mesa-dev libx11-xcb-dev '^libxcb*'

这样行不行?

对我的没起作用 用楼下的 搞定了

Reply View the author
zousl
deepin
2021-08-25 20:15
#7
把一切操作变成GUI

你是不是用的pycharm?没有勾选使用外部库吧?

没有 就只用了pyside2  做个简单的demo

Reply View the author
yorun
deepin
2021-09-07 21:23
#8
忘记、过去
sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1

这样子试试看?

good

Reply View the author
New Thread

Popular Events

More
国际排名
WHLUG