Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/"
QtWS25 Last Chance

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt5.15.2pluginsqt.qpa.xcbqt.qpa.plugin
5 Posts 4 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qjay
    wrote on 15 Apr 2024, 17:15 last edited by
    #1

    Hello trying to build and run an application in Qt creator. I have built qt5.15.13 from source and installed qtcreator using installer. I am getting following error , the plugin flag=1 already.

    22:41:31: Starting /home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/ETheme...
    QML debugging is enabled. Only use this in a safe environment.
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "eglfs"
            ]
        },
        "archreq": 0,
        "className": "QEglFSIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "archreq": 0,
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "archreq": 0,
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimalegl"
            ]
        },
        "archreq": 0,
        "className": "QMinimalEglIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "archreq": 0,
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "vnc"
            ]
        },
        "archreq": 0,
        "className": "QVncIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-egl"
            ]
        },
        "archreq": 0,
        "className": "QWaylandEglPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-egl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-generic.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-generic.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland"
            ]
        },
        "archreq": 0,
        "className": "QWaylandIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-xcomposite-egl"
            ]
        },
        "archreq": 0,
        "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-xcomposite-egl")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "wayland-xcomposite-glx"
            ]
        },
        "archreq": 0,
        "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("wayland-xcomposite-glx")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
    Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "xcb"
            ]
        },
        "archreq": 0,
        "className": "QXcbIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.13/plugins" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug" ...
    QFactoryLoader::QFactoryLoader() looking at "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/ETheme"
    "Failed to extract plugin meta data from '/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/ETheme'" 
             not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/main.o"
    "Failed to extract plugin meta data from '/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/main.o'" 
             not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/Makefile"
    QElfParser: '/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/Makefile' is not an ELF object
    "'/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/Makefile' is not an ELF object" 
             not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/qrc_qml.cpp"
    QElfParser: '/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/qrc_qml.cpp' is not an ELF object
    "'/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/qrc_qml.cpp' is not an ELF object" 
             not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/qrc_qml.o"
    "Failed to extract plugin meta data from '/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/qrc_qml.o'" 
             not a plugin
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.13/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.13/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/local/Qt-5.15.13/plugins/platforms/libqlinuxfb.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "archreq": 0,
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.13/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/local/Qt-5.15.13/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "archreq": 0,
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.13/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/local/Qt-5.15.13/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "archreq": 0,
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.13/plugins/platforms/libqvnc.so"
    Found metadata in lib /usr/local/Qt-5.15.13/plugins/platforms/libqvnc.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "vnc"
            ]
        },
        "archreq": 0,
        "className": "QVncIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.13/plugins/platforms/libqwebgl.so"
    Found metadata in lib /usr/local/Qt-5.15.13/plugins/platforms/libqwebgl.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "webgl"
            ]
        },
        "archreq": 0,
        "className": "QWebGLIntegrationPlugin",
        "debug": false,
        "version": 331520
    }
    
    
    Got keys from plugin meta data ("webgl")
    QFactoryLoader::QFactoryLoader() checking directory path "/home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/platforms" ...
    Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)
    QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)"
    qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/"
    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 (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimal (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimalegl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), offscreen (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), vnc (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-egl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-xcomposite-egl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-xcomposite-glx (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), xcb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb, minimal, offscreen, vnc, webgl.
    
    22:41:32: /home/nightmare/Projects/qt_projects/E-Scooty-Dashboard-/build/qt5_15-Debug/ETheme crashed.
    
    

    when i do which libqxcb.so

    /home/nightmare/.local/lib/python3.6/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so
    /home/nightmare/Qt/QtCreator/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so
    /home/nightmare/pyqt_learn/projects/venv/lib/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so
    /snap/mame/4278/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
    /snap/retroarch/2648/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
    /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
    
    

    thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 Apr 2024, 18:45 last edited by
      #2

      Hi,

      You seem to have quite a lot of stuff there.

      Do you have LD_LIBRARY_PATH modified ?

      Are you using the Qt version from your distribution or a different one that you built yourself ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply 16 Apr 2024, 01:21
      0
      • SGaistS SGaist
        15 Apr 2024, 18:45

        Hi,

        You seem to have quite a lot of stuff there.

        Do you have LD_LIBRARY_PATH modified ?

        Are you using the Qt version from your distribution or a different one that you built yourself ?

        Q Offline
        Q Offline
        Qjay
        wrote on 16 Apr 2024, 01:21 last edited by
        #3

        @SGaist Hi o/
        I am using qt-everywhere from official website : https://download.qt.io/archive/qt/5.15/5.15.13/single/
        built on ubuntu 22.04 when I used "./configure" i got following too

        Note: The following modules are not being compiled in this configuration:
            webenginecore
            webengine
            webenginewidgets
            pdf
            pdfwidgets
        
        WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
        
        Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
        On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
        On macOS, you can use Homebrew's llvm package.
        On Windows, you must set LLVM_INSTALL_DIR to the installation path.
        
        WARNING: Tool bison is required to build QtWebEngine.
        
        WARNING: Tool bison is required to build QtPdf.
        
        WARNING: QtWebEngine will not be built.
        
        WARNING: QtPdf will not be built.
        
        Qt is now configured for building. Just run 'gmake'.
        Once everything is built, you must run 'gmake install'.
        Qt will be installed into '/usr/local/Qt-5.15.13'.
        
        Prior to reconfiguration, make sure you remove any leftovers from
        the previous build.
        
        

        I don't think this is affecting my issue anyway. I am only using these additional environment variables in QtCreator

        QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/
        QT_DEBUG_PLUGINS=1
        

        now regarding LD_LIBRARY_PATH , I don't think I have set it anywhere or modified it. It's not set in my .bashrc or .profile atleast

        thanks :)

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on 16 Apr 2024, 06:02 last edited by
          #4

          Hi, looks like you have two versions of Qt5 installed:
          the default Qt5 one (from the Ubuntu 22.04 distribution
          Qt 5.15.3 downloaded from Qt

          You're running an app using 5.15.3 but because you've set QT_QPA_PLATFORM_PLUGIN_PATH to the default Qt version which I think lacks support for OpenGl, which is way to xcb plugin from the default Qt fails to load.

          Try either removing that QT_QPA_PLATFORM_PLUGIN_PATH env setting, or upgrade the default Qt so that it supports OpenGL (as the 5.15.3 version does) say something like this:
          sudo apt remove qt5-default-dev
          sudo apt install libqt5opengl5-dev

          1 Reply Last reply
          3
          • F Offline
            F Offline
            fchen0000
            wrote on 17 Sept 2024, 04:30 last edited by
            #5

            Thanks for the hint, I did sudo apt remove qt5* libqt5* and that solved my problem. The system QT5 was too old.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved