Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cannot load library libqxcb.so



  • I installed this PPA for Ubuntu 18.04 and now I get this error when trying to run applications that depend on QT. This is the error I get.

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
    Cannot load library /opt/qt512/plugins/platforms/libqxcb.so: (/opt/qt512/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine9glyphDataEj6QFixedNS_11GlyphFormatERK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
    QLibraryPrivate::loadPlugin failed on "/opt/qt512/plugins/platforms/libqxcb.so" : "Cannot load library /opt/qt512/plugins/platforms/libqxcb.so: (/opt/qt512/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine9glyphDataEj6QFixedNS_11GlyphFormatERK10QTransform 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: linuxfb, minimal, offscreen, vnc, wayland, wayland-xcomposite-glx, xcb.
    
    Aborted (core dumped)
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What do you get if you run ldd on the plugin file ?



  • This file?

    ldd /opt/qt512/plugins/platforms/libqxcb.so
       linux-vdso.so.1 (0x00007fffce2b8000)
       libQt5XcbQpa.so.5 => /opt/qt512/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x00007f0dc2d16000)
       libQt5Gui.so.5 => /opt/qt512/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007f0dc2681000)
       libQt5Core.so.5 => /opt/qt512/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007f0dc20bc000)
       libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0dc1cdc000)
       libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0dc18eb000)
       libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f0dc16a6000)
       libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f0dc13f2000)
       libQt5DBus.so.5 => /opt/qt512/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007f0dc1361000)
       libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0dc1142000)
       libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f0dc0f40000)
       libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f0dc0d3b000)
       libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f0dc0b36000)
       libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f0dc0933000)
       libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f0dc0730000)
       libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f0dc0520000)
       libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f0dc031c000)
       libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f0dc010f000)
       libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f0dbff0b000)
       libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f0dbfd04000)
       libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f0dbfafc000)
       libxcb-xinerama.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007f0dbf8f9000)
       libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f0dbf6dd000)
       libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f0dbf4b5000)
       libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f0dbf2ab000)
       libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f0dbef73000)
       libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0dbebd5000)
       libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f0dbe9cd000)
       libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f0dbe7b2000)
       libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f0dbe5aa000)
       libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f0dbe36b000)
       libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f0dbe054000)
       libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0dbde3c000)
       libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f0dbdbb7000)
       libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f0dbd985000)
       libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0dbd768000)
       libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f0dbd4ca000)
       libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007f0dbd029000)
       libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f0dbcc72000)
       libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0dbca6e000)
       /lib64/ld-linux-x86-64.so.2 (0x00007f0dc2c5b000)
       libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f0dbc83c000)
       libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f0dbc5ef000)
       libxcb-util.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007f0dbc3e9000)
       libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f0dbc1e5000)
       libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f0dbbfdf000)
       libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f0dbbdd8000)
       libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f0dbbbc3000)
       libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f0dbb951000)
       libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f0dbb69b000)
       libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f0dbb46a000)
       libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f0dbb23d000)
       libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f0db9694000)
       libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f0db9410000)
       librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0db9208000)
       liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f0db8fe2000)
       liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f0db8dc6000)
       libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f0db8aab000)
       libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f0db8896000)
    

  • Lifetime Qt Champion

    @dukenukemx said in Cannot load library libqxcb.so:

    This file?

    Problematic file is /opt/qt512/plugins/platforms/../../lib/libQt5XcbQpa.so.5



  • @jsulm I solved the problem. I realized that I had updated the PPA from QT5.12 to 5.12.3 to 5.12.6. Doing a apt remove qt512-meta-full does not remove the /opt/qt512 folder. So it was just overwriting files when I updated QT. I had to do a ppa purge of the PPA and delete /opt/qt512 folder and then reinstall qt512-meta-full and now everything is fine.


  • Lifetime Qt Champion

    Glad you found out and thanks for sharing !

    Please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :-)


Log in to reply