[SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
-
@hskoglund said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
export QT_PLUGIN_PATH=/usr/lib/qt/plugins
Hi dear @hskoglund
Your efficient advises helped me too. just wanted to thank you. -
@NoWhereMan1979 said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
@hskoglund your export QT_PLUGIN_PATH=/usr/lib/qt/plugins advice has helped me too. THank you!
-
Hi,
I experienced this problem on Debian 10 Buster after upgrading my Qt to 5.15.2 and QtCreator to 14.0
In the end the lib libxcb-util.so.1 was missing.ldd /home/developer/Qt5/5.15.2/gcc_64/plugins/platforms/libqxcb.so ... libxcb-util.so.1 => not found ...
-
@superdummy worked for me
-
I stuck at this issue too.
I set the environment variable
export QT_PLUGIN_PATH=/usr/lib/qt/plugins
.
but not work.I run a python script use pyqt. Get the error message:
QObject::moveToThread: Current thread (0x55e4e5df2060) is not the object's thread (0x55e4e61624e0). Cannot move to target thread (0x55e4e5df2060) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx. Aborted (core dumped)
There is a file
/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins/platforms/libqxcb.so
I move the libqxcb.so in upper dir, not work either.output of
ldd /usr/lib/qt/plugins/platforms/libqxcb.so
linux-vdso.so.1 (0x00007ffe049cc000) libQt5XcbQpa.so.5 => /usr/lib/libQt5XcbQpa.so.5 (0x00007f11af265000) libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f11aebff000) libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f11ae6e1000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f11ae4cb000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f11ae2ff000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f11ae2b0000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f11ae1e3000) libQt5DBus.so.5 => /usr/lib/libQt5DBus.so.5 (0x00007f11ae163000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f11ae142000) libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f11ae13d000) libxcb-icccm.so.4 => /usr/lib/libxcb-icccm.so.4 (0x00007f11ae137000) libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007f11ae131000) libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f11ae12a000) libxcb-keysyms.so.1 => /usr/lib/libxcb-keysyms.so.1 (0x00007f11ae125000) libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f11ae113000) libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0x00007f11ae10d000) libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f11ae0fd000) libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f11ae0f8000) libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f11ae0ec000) libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f11ae0e2000) libxcb-xinerama.so.0 => /usr/lib/libxcb-xinerama.so.0 (0x00007f11ae0dd000) libxcb-xkb.so.1 => /usr/lib/libxcb-xkb.so.1 (0x00007f11ae0bf000) libxcb-xinput.so.0 => /usr/lib/libxcb-xinput.so.0 (0x00007f11ae09a000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f11ae070000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f11adf2c000) libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f11adf22000) libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f11adf05000) libxkbcommon-x11.so.0 => /usr/lib/libxkbcommon-x11.so.0 (0x00007f11adefb000) libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f11adeb2000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f11add76000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f11adc30000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f11adc15000) libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f11adb8f000) libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f11adb58000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f11adb3e000) libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f11ada65000) libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f11ada4d000) libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f11ad971000) libdouble-conversion.so.3 => /usr/lib/libdouble-conversion.so.3 (0x00007f11ad95b000) libicui18n.so.70 => /usr/lib/libicui18n.so.70 (0x00007f11ad635000) libicuuc.so.70 => /usr/lib/libicuuc.so.70 (0x00007f11ad439000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f11ad432000) libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f11ad3a3000) libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f11ad2cc000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f11af3c5000) libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f11ad29c000) libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f11ad289000) libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f11ad27b000) libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f11ad224000) libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f11ad21c000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f11ad217000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f11ad20f000) libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f11ad206000) libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f11ad18d000) libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f11ad0d5000) libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f11ad0a2000) libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f11ad07d000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f11ad072000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f11ad047000) liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f11ad024000) libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f11ad018000) libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f11acedc000) libicudata.so.70 => /usr/lib/libicudata.so.70 (0x00007f11ab2c0000) libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f11ab29b000) libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f11ab273000)
System information:
OS: Manjaro 21.2.2 Qonos Kernel: x86_64 Linux 5.15.16-1-MANJARO Uptime: 5h 18m Packages: 1396 Shell: fish 3.3.1 Resolution: 3840x1080 DE: KDE5 / Plasma WM: KWin GTK Theme: Breeze [GTK2/3] Icon Theme: breeze-dark Disk: 31G / 236G (14%) CPU: Intel Core i7-7700K @ 8x 4.5GHz [44.0°C] GPU: Intel Corporation HD Graphics 630 (rev 04) RAM: 6722MiB / 15866MiB Python 3.10.1
-
-
@hskoglund Sorry to bother you again, the issue keep coming out after somethime. And I dont know how to solve it, for now.
I cant start my kate(build-in editor in manajaro)
And the error message is:
QObject::moveToThread: Current thread (0x55b676c29770) is not the object's thread (0x55b676c337c0). Cannot move to target thread (0x55b676c29770) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx. fish: Job 1, 'kate' terminated by signal SIGABRT (Abort)
After the reboot the issue is gone for just a while. How to solve it?
My system info is:
OS: Manjaro 21.2.2 Qonos Kernel: x86_64 Linux 5.15.16-1-MANJARO Uptime: 8h 2m Packages: 1397 Shell: python Resolution: 3840x1080 DE: KDE5 / Plasma WM: KWin GTK Theme: Breeze [GTK2/3] Icon Theme: breeze-dark Disk: 33G / 236G (15%) CPU: Intel Core i7-7700K @ 8x 4.5GHz [56.0°C] GPU: Intel Corporation HD Graphics 630 (rev 04) RAM: 7016MiB / 15866MiB Python 3.10.1 NVIM v0.6.1 Build type: Release LuaJIT 2.0.5 Compiled by builduser Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim" Run :checkhealth for more info alacritty 0.9.0 (fed349aa)
See if you need other info?
-
@LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
How to solve it?
Set QT_DEBUG_PLUGINS to one before starting the app:
export QT_DEBUG_PLUGINS=1 kate
Post the output.
-
@LiZheCN This looks very strange:
Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... loaded library "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins/platforms/libqxcb.so" QObject::moveToThread: Current thread (0x563183178770) is not the object's thread (0x563183184ca0). Cannot move to target thread (0x563183178770)
All other plug-ins are loaded from /usr/lib/qt/plugins, not /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins
Do you have /home/lizhe/.local/lib/python3.10 in your PATH? -
@jsulm said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins
Yes I have this dir
The libxcb.so file I put it here, in case you need it
https://github.com/woshichuanqilz/others/blob/master/libqxcb.so
-
@LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
in case you need it
I don't need it.
The thing is that kate should not load this plug-in from that location but from /usr/lib/qt/plugins!
Try to rename libxcb.so in /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins to see whether this solves your issue.
And you did not answer my question. -
What is your question ?
you mean this? :
Do you have /home/lizhe/.local/lib/python3.10 in your PATH?
I answered here.
Hope I havent missed something
I will change the name of the
so
file. When this issue come out again. When I get the result I will give a reply. Thank you a lot for your help, really. I already to reinstall the system already. : P -
@LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":
you mean this?
Yes, but the question is not whether that folder exists (it does of course), but whether this path is set in your PATH environment variable (or any other environment variable).
echo $PATH
-
I change the name of libxcb.so to libxcb.so1 it still loaded. and get the same error.
I remove the libxcb.so file in/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins
. Everything seems works fine now.
Thank you.Here is the output:
echo $PATH
/home/lizhe/Applications/Clash /home/lizhe/Applications/Clion/bin /home/lizhe/OriNote/linuxConfig/CommonScripts /home/lizhe/Applications /home/lizhe/.local/bin/ /home/lizhe/OriNote/wikiScripts /home/lizhe/.yarn/bin/ /home/lizhe/Applications/VSCode/ /home/lizhe/Applications/clion-2021.3.2/bin /home/lizhe/Applications/pycharm-2021.3.1/bin/ /home/lizhe/OriNote/wikiScripts/Utils /home/lizhe/OriNote/wikiScripts /home/lizhe/Applications/Clash /home/lizhe/Applications/Clion/bin /home/lizhe/OriNote/linuxConfig/CommonScripts /home/lizhe/Applications /home/lizhe/.local/bin/ /home/lizhe/OriNote/wikiScripts /home/lizhe/.yarn/bin/ /home/lizhe/Applications/VSCode/ /home/lizhe/Applications/clion-2021.3.2/bin /home/lizhe/Applications/pycharm-2021.3.1/bin/ /home/lizhe/OriNote/wikiScripts/Utils /home/lizhe/OriNote/wikiScripts /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /var/lib/snapd/snap/bin
-
-
-