qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
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! -
@Lengendary Thank you!
-
Hey guys,
I'm getting the same error but not able to find any reason.
I'm building this project, https://github.com/BelledonneCommunications/linphone-desktop
and getting the error,(linphone) ➜ Packages git:(master) ./Linphone-4.5.1.AppImage 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: xcb. [1] 28317 abort (core dumped) ./Linphone-4.5.1.AppImage (linphone) ➜ Packages git:(master) ldd ~/Qt/5.12.9/gcc_64/plugins/platforms/libqxcb.so linux-vdso.so.1 (0x00007ffe12cd8000) libQt5XcbQpa.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x00007f79c2a18000) libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f79c27d3000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f79c251f000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f79c2302000) libQt5Gui.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007f79c1ab3000) libQt5DBus.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007f79c1827000) libQt5Core.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007f79c108c000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f79c0e00000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f79c0be1000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f79c09df000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f79c07b7000) libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f79c05ad000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f79c039b000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f79c0063000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f79bfcc5000) libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f79bfabd000) libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f79bf87e000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f79bf67a000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f79bf2f1000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f79bf0d9000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f79bece8000) libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f79beae6000) libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f79be7cf000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f79be59d000) libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f79be36b000) libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f79be11e000) libicui18n.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicui18n.so.56 (0x00007f79bdc85000) libicuuc.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicuuc.so.56 (0x00007f79bd8cd000) libicudata.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicudata.so.56 (0x00007f79bbeea000) /lib64/ld-linux-x86-64.so.2 (0x00007f79c2fbe000) libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f79bbcb9000) libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f79bba03000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f79bb7ff000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f79bb5f9000) libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f79bb3dd000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f79bb16b000) libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f79baee7000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f79bacd2000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f79baaca000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f79ba8a4000) liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f79ba688000) libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f79ba36c000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f79ba157000)
What could be the issue? Please suggest.
Please let me know if you need to know anything else for this. -
@singhravi said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
Hey guys,
I'm getting the same error but not able to find any reason.
I'm building this project, https://github.com/BelledonneCommunications/linphone-desktop
and getting the error,(linphone) ➜ Packages git:(master) ./Linphone-4.5.1.AppImage 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: xcb. [1] 28317 abort (core dumped) ./Linphone-4.5.1.AppImage (linphone) ➜ Packages git:(master) ldd ~/Qt/5.12.9/gcc_64/plugins/platforms/libqxcb.so linux-vdso.so.1 (0x00007ffe12cd8000) libQt5XcbQpa.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x00007f79c2a18000) libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f79c27d3000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f79c251f000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f79c2302000) libQt5Gui.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007f79c1ab3000) libQt5DBus.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007f79c1827000) libQt5Core.so.5 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007f79c108c000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f79c0e00000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f79c0be1000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f79c09df000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f79c07b7000) libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f79c05ad000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f79c039b000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f79c0063000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f79bfcc5000) libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f79bfabd000) libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f79bf87e000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f79bf67a000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f79bf2f1000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f79bf0d9000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f79bece8000) libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f79beae6000) libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f79be7cf000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f79be59d000) libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f79be36b000) libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f79be11e000) libicui18n.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicui18n.so.56 (0x00007f79bdc85000) libicuuc.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicuuc.so.56 (0x00007f79bd8cd000) libicudata.so.56 => /home/ravi/Qt/5.12.9/gcc_64/plugins/platforms/../../lib/libicudata.so.56 (0x00007f79bbeea000) /lib64/ld-linux-x86-64.so.2 (0x00007f79c2fbe000) libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f79bbcb9000) libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f79bba03000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f79bb7ff000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f79bb5f9000) libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f79bb3dd000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f79bb16b000) libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f79baee7000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f79bacd2000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f79baaca000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f79ba8a4000) liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f79ba688000) libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f79ba36c000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f79ba157000)
What could be the issue? Please suggest.
Please let me know if you need to know anything else for this.Hey @SGaist , Can you please suggest anything for this?
-
@singhravi run ldd on the plugin itself.
-
I missed that line.
I see that you have that issue with an AppImage, does it also happen with just your binary ?
-
What are you using to create that AppImage ?
-
@SGaist
I'm building this project from github, https://github.com/BelledonneCommunications/linphone-desktop.
It has the everything included in its cmakelists.txt and I just need to add-DENABLE_APP_PACKAGING=YES
to create the package.
It useslinuxdeploy
andlinuxdeploy-plugin-qt
for packaging.
This is the script for packaging, https://github.com/BelledonneCommunications/linphone-desktop/blob/master/linphone-app/tools/create_appimage.sh -
@SGaist
I'm building this project from github, https://github.com/BelledonneCommunications/linphone-desktop.
It has the everything included in its cmakelists.txt and I just need to add-DENABLE_APP_PACKAGING=YES
to create the package.
It useslinuxdeploy
andlinuxdeploy-plugin-qt
for packaging.
This is the script for packaging, https://github.com/BelledonneCommunications/linphone-desktop/blob/master/linphone-app/tools/create_appimage.shHey @SGaist , Please let me know if you need anyother information.
-
One thing I noted while running the Appimage with
QT_DEBUG_PLUGINS=1
was that it was trying to load plugins from a directory intmp
directory which does not exists. I don't know if this is the correct behaviour.
Following the log when i run the Appimage,QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_LinphoELXhn2/usr/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/tmp/.mount_LinphoELXhn2/usr/plugins/platforms/libqxcb.so" Found metadata in lib /tmp/.mount_LinphoELXhn2/usr/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "className": "QXcbIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_LinphoELXhn2/usr/bin/platforms" ... Cannot load library /tmp/.mount_LinphoELXhn2/usr/plugins/platforms/libqxcb.so: (/tmp/.mount_LinphoELXhn2/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference) QLibraryPrivate::loadPlugin failed on "/tmp/.mount_LinphoELXhn2/usr/plugins/platforms/libqxcb.so" : "Cannot load library /tmp/.mount_LinphoELXhn2/usr/plugins/platforms/libqxcb.so: (/tmp/.mount_LinphoELXhn2/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)" 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: xcb. [1] 7814 abort (core dumped) ./Linphone-4.5.1.AppImage
-
Hi, AppImage extracts all the files into the
/tmp
directory, so it's expected that the files exist there (as long as the app runs).
But it seems all Qt files are not from version Qt 5.12.9, the error is that libQt5XcbQpa.so.5 is looking for the function QFontEngine::bitmapForGlyph() in libQt5Gui.so.5 but it's not there. I think that function is maybe 6 years old, perhaps you any other (older) Qt version installed than 5.12.9?Edit: I greped the sources, the function signature was changed between 5.12.4 and 5.12.5:
in Qt 5.12.4:QImage QFontEngine::bitmapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform&);
in Qt 5.12.5:
QImage QFontEngine::bitmapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform&, const QColor &);
since libQt5XcbQpa.so.5 asks for the old one, most likely it's the other way around, i.e. libQt5XcbQpa.so.5 is from 5.12.4 (or older Qt version) and libQt5Gui.so.5 is from 5.12.9.
-
@hskoglund Thanks a lot for the explanation! This is great.
Actually i've installed Qt 5.12.9 with the installer and all the other dependencies were installed usingapt
which i think must be causing the mismatch in compatible versions as 18.04 ubuntu could have old packages in its repo.
So what do you suggest? should i down grade qt version or should i install newer dependency libraries by using some custom apt sources? -
In the long run the best is to do an apt remove for the apt installed Qt and just stick with Qt’s online installer (because it gives you fresher versiobns).
But you can also try to harmonize them, open a Terminal and type qtdiag (it should pick up the apt installed Qt)
Ser what version is says, then use the MaintenanceTool to downgrade to that version.