qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Hi,
You should run your application with the
QT_DEBUG_PLUGINS
environment variable set to 1 to see what might go wrong when the plugin is loaded. -
~ $ export QT_DEBUG_PLUGINS=1 ~ $ qtcreator QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimal.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqvnc.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "className": "QVncIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqxcb.so" Found metadata in lib /usr/lib/qt/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "className": "QXcbIntegrationPlugin", "debug": false, "version": 330497 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libxcb-xinerama.so.0: invalid ELF header) QLibraryPrivate::loadPlugin failed on "/usr/lib/qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libxcb-xinerama.so.0: invalid ELF header)" 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, xcb. Aborted (core dumped)
So my guess is that this is the key message:
Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libxcb-xinerama.so.0: invalid ELF header) QLibraryPrivate::loadPlugin failed on "/usr/lib/qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/qt/plugins/platforms/libqxcb.so: (/usr/lib/libxcb-xinerama.so.0: invalid ELF header)"
/usr/lib/qt/plugins/platforms/libqxcb.so is owned by qt5-base 5.11.1-1
so what now? do I need to reinstall qt5-base or do something else?
Best regards.
-
HI,
Did you run
ldd
on your libraries and libxcb-xinerama versions ? -
You should try installing the corresponding dev packages on your system.
-
The same as before:
~ $ ldd /usr/lib/qt/plugins/platforms/libqxcb.so /usr/lib/qt/plugins/platforms/libqxcb.so: error while loading shared libraries: /usr/lib/libxcb-xinerama.so.0: invalid ELF header
but after that
~ $ sudo pacman -S libxcb [sudo] password for tomasz: warning: libxcb-1.13-1 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... Packages (1) libxcb-1.13-1 Total Download Size: 0.99 MiB Total Installed Size: 3.96 MiB Net Upgrade Size: 0.00 MiB :: Proceed with installation? [Y/n] Y :: Retrieving packages... libxcb-1.13-1-x86_64 1017.5 KiB 242K/s 00:04 [##############################] 100% (1/1) checking keys in keyring [##############################] 100% (1/1) checking package integrity [##############################] 100% (1/1) loading package files [##############################] 100% (1/1) checking for file conflicts [##############################] 100% (1/1) checking available disk space [##############################] 100% :: Processing package changes... (1/1) reinstalling libxcb [##############################] 100% :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... ~ $ pacman -Qo /usr/lib/libxcb-xinerama.so.0 /usr/lib/libxcb-xinerama.so.0 is owned by libxcb 1.13-1 ~ $ ldd /usr/lib/qt/plugins/platforms/libqxcb.so linux-vdso.so.1 (0x00007ffc93f56000) libQt5XcbQpa.so.5 => /usr/lib/libQt5XcbQpa.so.5 (0x00007f730ea63000) libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f730e2d5000) libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f730dbd4000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f730d84b000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f730d48f000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f730d24c000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f730cf83000) libQt5DBus.so.5 => /usr/lib/libQt5DBus.so.5 (0x00007f730ccf3000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f730cad5000) libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f730c8d3000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f730c594000) libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f730c383000) libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f730c17b000) libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f730bf5f000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f730bd54000) libxcb-xkb.so.1 => /usr/lib/libxcb-xkb.so.1 (0x00007f730bb37000) libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0x00007f730b933000) libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f730b725000) libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f730b51e000) libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f730b316000) libxcb-xinerama.so.0 => /usr/lib/libxcb-xinerama.so.0 (0x00007f730b113000) libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f730af03000) libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007f730acfe000) libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f730aafa000) libxcb-keysyms.so.1 => /usr/lib/libxcb-keysyms.so.1 (0x00007f730a8f7000) libxcb-icccm.so.4 => /usr/lib/libxcb-icccm.so.4 (0x00007f730a6f2000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f730a4c9000) libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f730a2c5000) libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f730a086000) libxkbcommon-x11.so.0 => /usr/lib/libxkbcommon-x11.so.0 (0x00007f7309e7f000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f7309aea000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f73098d2000) libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f7309647000) libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f7309411000) libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f7309165000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f7308f4e000) libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f7308cc4000) libicui18n.so.61 => /usr/lib/libicui18n.so.61 (0x00007f7308819000) libicuuc.so.61 => /usr/lib/libicuuc.so.61 (0x00007f730845f000) libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f73081e8000) libdouble-conversion.so.1 => /usr/lib/libdouble-conversion.so.1 (0x00007f7307fd8000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f7307dd4000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f7307abd000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f730efdd000) libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f730788b000) libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f7307684000) libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f7307474000) libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f7307223000) libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f7307011000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f7306e0d000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f7306c07000) libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f7306a01000) libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f73067d0000) libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f730651a000) libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f73062ee000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f73060e6000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f7305ec0000) liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f7305ca3000) libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f7305987000) libicudata.so.61 => /usr/lib/libicudata.so.61 (0x00007f7303de2000) libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f7303b70000) libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f7303950000) ~ $ qtcreator QApplication: invalid style override passed, ignoring it.
so it seems that reinstalling libxcb fixed the issue. So thank you very much guys.
I own you really big beer :-)@SGaist
there is no such thing on manjaro or archlinux which manjaro is baseed on -
qt.qpa.xcb: could not connect to display <<-- Is that the message you're talking about?
Could you explain a little better what was your problem and how did you fix it?
What is lxc? And why to run another GUI app? I really didn't understand what you did to fix this problem.
-
Hi
I faced this problem and I got a new version of linuxdeployqt and now that error is gone. -
Hi for all!
I downloaded and extracted XnView MP version 0.96 on Arch Linux and same error happened.
Solution:
I am deleted these two files: libfreetype.so and libfreetype.so.6 .
Here is the result:
-
Hi ,
I am facing a similar issue could you please help.Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/opt/appname/libs/Qt/plugins/platforms" 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, xcb.
-
@jarvis said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqoffscreen.so"
GotHi,
Start your application with the QT_DEBUG_PLUGINS environment variable set to 1 to get more information.
-
I am using Qt-5.15.0, got the same problem.
More details are:
QLibraryPrivate::loadPlugin failed on "/opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/5.15.0/gcc_64/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"Solved by installing the dependent package.
Command to install: sudo apt-get install libxcb-xinerama0 -
Fresh install had the same issues reported here. Did what @Srinivas-Reddy suggested and install libxcb-xinerama0 and everything started working. Thanks!
-
@Srinivas-Reddy many thanks
-
Thanks very much!
I spent several hours trying to solve this problem until I got here.
sudo apt-get install libxcb-xinerama0
Thanks!