qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Installed Qt on Ubuntu 22.04 LTS. First time installing it on Linux. I created a test project, build and tried running it and got the error:
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: minimal, minimalegl, xcb, vnc, wayland, offscreen, linuxfb, vkkhrdisplay, wayland-egl, eglfs.
Searched online but all the things I have tried have not worked. I'm not familiar enough with the locations where the qt installer puts files on Linux.
-
Hi @arroyjose,
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
For modern Ubuntu's, I resolve this with:
sudo apt install libxcb-cursor0
Cheers.
-
@Paul-Colby said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
sudo apt install libxcb-cursor0
That did it! Wow.
Thank you so much!
-
-
my error is still not resolved
error message - (annno) workstation@workstation-HP-Z4-G4-Workstation:~/AutoLabelImg$ python labelImg.py
QObject::moveToThread: Current thread (0x56375e8f67b0) is not the object's thread (0x563763866bf0).
Cannot move to target thread (0x56375e8f67b0)qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/workstation/anaconda3/envs/annno/lib/python3.7/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, webgl.
Aborted (core dumped)
I am trying to run AutoLabelImag
tried everything, please help:) -
@ami01 As always in such situations: set QT_DEBUG_PLUGINS env variable before starting the app and inspect its output to see why exactly the xcb plug-in fails to load. You can also post the output here.
See: https://doc.qt.io/qt-6/debug.html -