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

avatar
作者
猴君
阅读量: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

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!