How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error
-
Hello,
I have installed the new QT 5.14.2 instance on my Ubuntu-16.04. I am newbee to the QT and this is the first time I am using the QT. After loading my project when I try to run I am getting the below 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb. Press <RETURN> to close this window...
I searched a lot on this and tried all suggested solutions.
- I tried installing "sudo apt install libxcb-xinerama0"
- I installed "sudo apt-get install libx11-xcb1
- tried below:
$: export QT_DEBUG_PLUGINS=1
$: ./qtcreatorthen got below error:
Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/home/siddhu/Documents/Code_6.0/integration/build-Tester-Desktop_Qt_5_14_2_GCC_64bit/platforms" ... Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/sidddu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so)) QLibraryPrivate::loadPlugin failed on "/home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found (required by /home/siddhu/Qt5.14.2/5.14.2/gcc_64/plugins/platforms/libqxcb.so))"
Nothing is working for me can anybody help me on this please. I have already wasted 1 full day on debugging this. Kind request.
regards,
Siddhartha V -
@VRonin said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:
sudo apt-get install libxcb-icccm4 libxcb-xkb1 libxcb-icccm4 libxcb-image0 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-xinerama0
hi @VRonin ,
thank you for the reply. I tried installing them but it shows they are all already present:
regards,
Siddhartha V -
@Siddhartha-V said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:
After loading my project
Instead of your project, can you loan an example project and see if that works?
-
Hi @VRonin ,
Yes, I tried examples that are available inside the QT install directory. They are working.
I tried two example projects 1. bluetooth and 2. demos.
Both worked without any error.
regards,
Siddhartha V -
So the problem is with your project.
@Siddhartha-V said in How to resolve qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. error:
`Qt_5_PRIVATE_API' not found
I think your project needs the private API of Qt, you can get them with maintenance tool or apt-get but you should first understand what your project needs
-
oh ok thank you. Will update if I get any progress.