您的位置:首页 > 文旅 > 美景 > 程序使用Qt5报错:/libqxcb.so: (libxcb-icccm.so.4: 无法打开共享对象文件

程序使用Qt5报错:/libqxcb.so: (libxcb-icccm.so.4: 无法打开共享对象文件

2024/10/6 12:21:59 来源:https://blog.csdn.net/qq_43511677/article/details/140464925  浏览:    关键词:程序使用Qt5报错:/libqxcb.so: (libxcb-icccm.so.4: 无法打开共享对象文件
以下操作均在 /X-AnyLabeling目录下

QElfParser: '/usr/local/Python-3.9.19/bin/tqdm' is not an ELF object
"'/usr/local/Python-3.9.19/bin/tqdm' is not an ELF object" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/local/Python-3.9.19/bin/ttx"
QElfParser: '/usr/local/Python-3.9.19/bin/ttx' is not an ELF object
"'/usr/local/Python-3.9.19/bin/ttx' is not an ELF object" 
         not a plugin

..
Cannot load library /usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: 无法打开共享对象文件: 没有那个文件或目录)
QLibraryPrivate::loadPlugin failed on "/usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: 无法打开共享对象文件: 没有那个文件或目录)"
...

Qt5/Qt5/plugins/platforms), wayland-xcomposite-glx (from /usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms), webgl (from /usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms), xcb (from /usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

已放弃

执行以下代码: 

sudo yum install xcb-util-wm 

 

[root@Centos7-Mode-V11 X-AnyLabeling]# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
[root@Centos7-Mode-V11 X-AnyLabeling]# sudo yum install qt5-qtbase qt5-qtbase-devel 

 

执行命令依旧报错:

 strace -o trace.log python3 anylabeling/app.py

 Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Python-3.9.19/bin/platforms" ...
loaded library "/usr/local/Python-3.9.19/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 
qt.qpa.xcb: could not connect to display

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com