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 load the Qt platform plugin "xcb" in "" even though it was found.

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

Scheduled Pinned Locked Moved Solved Installation and Deployment
183 Posts 87 Posters 879.8k 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.
  • S SGaist
    1 Aug 2018, 21:31

    HI,

    Did you run ldd on your libraries and libxcb-xinerama versions ?

    P Offline
    P Offline
    pixel_08
    wrote on 17 Jun 2021, 10:04 last edited by
    #85

    @SGaist hi,
    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.
    /bin/bash: line 133: 1745 Aborted (core dumped) python csv2txt.py

    Then I added, export QT_DEBUG_PLUGINS=1
    got error as,
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
    Cannot load library /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)
    QLibraryPrivate::loadPlugin failed on "/builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)"

    and ran ldd /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so

    linux-vdso.so.1 (0x00007ffc728e9000)
    libQt5XcbQpa.so.5 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x00007fda88aa2000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fda88a50000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fda88994000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fda88776000)
    libQt5Gui.so.5 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007fda87e45000)
    libQt5DBus.so.5 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007fda87bb7000)
    libQt5Core.so.5 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007fda873c1000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fda8732d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fda8730c000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fda87307000)
    libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007fda87300000)
    libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007fda870f9000)
    libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fda870f4000)
    libxcb-util.so.1 => not found
    libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007fda86ef1000)
    libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fda86edf000)
    libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007fda86cdb000)
    libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fda86cca000)
    libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fda86cc5000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fda86cbb000)
    libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fda86cb1000)
    libxcb-xinerama.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fda86cac000)
    libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fda86c8e000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fda86c62000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fda86a50000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fda8690f000)
    libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fda86904000)
    libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fda868c2000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fda868bd000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fda86737000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fda865b4000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fda8659a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fda863d9000)
    libxcb-util.so.1 => not found
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fda863d4000)
    libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fda862b3000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fda86276000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fda8626d000)
    libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fda86234000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fda861e1000)
    libicui18n.so.56 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libicui18n.so.56 (0x00007fda85d46000)
    libicuuc.so.56 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libicuuc.so.56 (0x00007fda8598e000)
    libicudata.so.56 => /builds/sravani_detect/video_frames/venv/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libicudata.so.56 (0x00007fda83fab000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fda89001000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fda83f77000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fda83eba000)
    libxcb-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 (0x00007fda83cb1000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fda83aad000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fda838a7000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fda83833000)
    libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fda83790000)
    libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fda83776000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fda8376c000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fda83744000)
    liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fda83725000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fda83607000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fda835e2000)

    what to do next?
    Thank you!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 Jun 2021, 11:44 last edited by
      #86

      Install the package that provides "libxcb-util.so.1" on your system.

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

      P S 2 Replies Last reply 17 Jun 2021, 17:08
      1
      • S SGaist
        17 Jun 2021, 11:44

        Install the package that provides "libxcb-util.so.1" on your system.

        P Offline
        P Offline
        pixel_08
        wrote on 17 Jun 2021, 17:08 last edited by
        #87

        @SGaist
        Thank you, Can we run PyQt5 applications in gitlab by setting up a pipeline?
        Please clarify this.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Jun 2021, 17:10 last edited by
          #88

          Do you mean run tests on your GUI in GitLab ?

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

          P 1 Reply Last reply 18 Jun 2021, 09:01
          0
          • S SGaist
            17 Jun 2021, 17:10

            Do you mean run tests on your GUI in GitLab ?

            P Offline
            P Offline
            pixel_08
            wrote on 18 Jun 2021, 09:01 last edited by
            #89

            @SGaist yes

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 18 Jun 2021, 19:17 last edited by
              #90

              Yes you can, you have to use the offscreen backend though unless your runner provides adequate connection to an X server.

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

              1 Reply Last reply
              0
              • S Srinivas Reddy
                8 Jun 2020, 05:40

                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

                S Offline
                S Offline
                Srinivas Reddy
                wrote on 20 Jun 2021, 17:08 last edited by
                #91

                @Srinivas-Reddy This worked for me. Thank you.

                1 Reply Last reply
                0
                • J jarvis
                  21 May 2020, 18:03

                  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.

                  S Offline
                  S Offline
                  steel357
                  wrote on 24 Jun 2021, 16:52 last edited by
                  #92

                  @jarvis Hi jarvis,
                  I am also getting same problem
                  Got keys from plugin meta data ("webgl")
                  QFactoryLoader::QFactoryLoader() looking at "/home/vineeth/.local/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
                  Found metadata in lib /home/vineeth/.local/lib/python3.8/site-packages/PyQt5/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/bin/platforms" ...
                  loaded library "/home/vineeth/.local/lib/python3.8/site-packages/PyQt5/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 "" 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.

                  Aborted (core dumped)

                  did u found the solution??

                  I am using Linux in windows(WSL)

                  1 Reply Last reply
                  0
                  • S SGaist
                    17 Jun 2021, 11:44

                    Install the package that provides "libxcb-util.so.1" on your system.

                    S Offline
                    S Offline
                    steel357
                    wrote on 24 Jun 2021, 17:05 last edited by steel357
                    #93

                    @SGaist
                    @jarvis Hi guys,
                    I am also getting the same problem

                    Got keys from plugin meta data ("webgl")
                    QFactoryLoader::QFactoryLoader() looking at "/home/vineeth/.local/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
                    Found metadata in lib /home/vineeth/.local/lib/python3.8/site-packages/PyQt5/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/bin/platforms" ...
                    loaded library "/home/vineeth/.local/lib/python3.8/site-packages/PyQt5/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 "" 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.

                    Aborted (core dumped)

                    **did u found the solution??

                    I am using Linux in windows(WSL) and tried it normal ubuntu also getting same error**

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 24 Jun 2021, 17:24 last edited by
                      #94

                      "qt.qpa.xcb: could not connect to display"

                      You should check the Windows documentation.

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

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        MBat
                        wrote on 12 Jul 2021, 12:19 last edited by
                        #95

                        Good morning,

                        I am having trouble running a python code (not written by me) that uses pyroot.
                        My working system is Ubuntu 18.

                        At the start of the script I get the following message

                        cling::DynamicLibraryManager::loadLibrary(): /home/matteo/anaconda3/bin/../lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
                        Error in TInterpreter::TCling::AutoLoad: failure loading library libGX11TTF.so for TGX11TTF
                        cling::DynamicLibraryManager::loadLibrary(): /home/matteo/anaconda3/bin/../lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
                        Info in TApplication::InitializeGraphics: no TTF support

                        While, at the end, just before it crushes, (after export QT_DEBUG_PLUGINS=1) I get the following

                        QFactoryLoader::QFactoryLoader() checking directory path "/home/matteo/anaconda3/plugins/platforms" ...
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqeglfs.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqeglfs.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "eglfs"
                        ]
                        },
                        "archreq": 0,
                        "className": "QEglFSIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("eglfs")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqminimal.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqminimal.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "minimal"
                        ]
                        },
                        "archreq": 0,
                        "className": "QMinimalIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("minimal")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqminimalegl.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqminimalegl.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "minimalegl"
                        ]
                        },
                        "archreq": 0,
                        "className": "QMinimalEglIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("minimalegl")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqoffscreen.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqoffscreen.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "offscreen"
                        ]
                        },
                        "archreq": 0,
                        "className": "QOffscreenIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("offscreen")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqvnc.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqvnc.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "vnc"
                        ]
                        },
                        "archreq": 0,
                        "className": "QVncIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("vnc")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqwebgl.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqwebgl.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "webgl"
                        ]
                        },
                        "archreq": 0,
                        "className": "QWebGLIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("webgl")
                        QFactoryLoader::QFactoryLoader() looking at "/home/matteo/anaconda3/plugins/platforms/libqxcb.so"
                        Found metadata in lib /home/matteo/anaconda3/plugins/platforms/libqxcb.so, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "xcb"
                        ]
                        },
                        "archreq": 0,
                        "className": "QXcbIntegrationPlugin",
                        "debug": false,
                        "version": 330752
                        }

                        Got keys from plugin meta data ("xcb")
                        QFactoryLoader::QFactoryLoader() checking directory path "/home/matteo/anaconda3/bin/platforms" ...
                        Cannot load library /home/matteo/anaconda3/plugins/platforms/libqxcb.so: (/home/matteo/anaconda3/plugins/platforms/../../lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var)
                        QLibraryPrivate::loadPlugin failed on "/home/matteo/anaconda3/plugins/platforms/libqxcb.so" : "Cannot load library /home/matteo/anaconda3/plugins/platforms/libqxcb.so: (/home/matteo/anaconda3/plugins/platforms/../../lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var)"
                        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, minimal, minimalegl, offscreen, vnc, webgl, xcb.

                        The output of the command ls -l /usr/lib/x86_64-linux-gnu/libQt5Xcb* is

                        -rw-r--r-- 1 root root 1602 feb 7 2020 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.prl
                        lrwxrwxrwx 1 root root 21 feb 7 2020 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so -> libQt5XcbQpa.so.5.9.5
                        lrwxrwxrwx 1 root root 21 feb 7 2020 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.9.5
                        lrwxrwxrwx 1 root root 21 feb 7 2020 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9 -> libQt5XcbQpa.so.5.9.5
                        -rw-r--r-- 1 root root 1070840 feb 7 2020 /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9.5

                        So, the point is that I do not have a deep knowledge of Ubuntu system in genreal, and I do not know if the problem is only with QT plugins or is elsewhere. The only thing I know is that the code itself is working fine in other machines, so the problem should not rely there.

                        Thanks if you can help me, let me know if you need any other information.

                        Thanks!

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 12 Jul 2021, 19:18 last edited by
                          #96

                          Hi and welcome to devnet,

                          Your anaconda installation looks unusual, how did you do it ?

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

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            MBat
                            wrote on 12 Jul 2021, 20:04 last edited by
                            #97

                            Thanks for the welcome!

                            I actually don't remember anything particular from the installation of Anaconda. But it has been 3 years ago, so I might have forgotten.
                            Why do you say that it looks unusual?

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 12 Jul 2021, 20:19 last edited by
                              #98

                              @MBat said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                              anaconda3/plugins/platforms/libqxcb.so

                              Usually conda environments are not located at that level. That's what I find suspicious. But I have essentially used miniconda rather than the full Anaconda.

                              Your main issue is that there's something wrong with your libfontconfig library.

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

                              1 Reply Last reply
                              0
                              • M Matriarch
                                8 Sept 2020, 10:07

                                @Lengendary This is working solution for me, thank you

                                sudo apt-get install libxcb-xinerama0

                                V Offline
                                V Offline
                                Violet Giraffe
                                wrote on 17 Jul 2021, 11:48 last edited by Violet Giraffe
                                #99

                                @Matriarch, thank you,

                                sudo apt-get install libxcb-xinerama0
                                

                                worked for me on Ubuntu 20.04. Shame one has to scroll so deep down into the discussion before finding the answer.

                                Also, I recently spent a lot of time getting a Qt application to run in a Github Actions VM - I was battling the xcb errors. Here's the complete list of things that needed to be installed:

                                sudo apt-get install -qq libglu1-mesa-dev libx11-xcb-dev '^libxcb*'
                                
                                ali-aydinA 1 Reply Last reply 24 Oct 2021, 09:59
                                1
                                • S Offline
                                  S Offline
                                  sonamde
                                  wrote on 20 Jul 2021, 05:25 last edited by
                                  #100

                                  @Lengendary said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                                  libxcb-xinerama0

                                  I am also facing the same issue :
                                  Got keys from plugin meta data ("xcb")
                                  QFactoryLoader::QFactoryLoader() checking directory path "/qfs/people/deso666/.conda/envs/particle/bin/platforms" ...
                                  Cannot load library /qfs/people/deso666/.conda/envs/particle/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/share/apps/python/anaconda3.2019.3/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 "/qfs/people/deso666/.conda/envs/particle/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /qfs/people/deso666/.conda/envs/particle/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/share/apps/python/anaconda3.2019.3/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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

                                  sh: line 1: 26241 Aborted (core dumped) python gui_annotation.py

                                  Then I ran:

                                  user$ cd /qfs/people/deso666/.conda/envs/particle/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/
                                  user$ ldd libqxcb.so
                                  ./libqxcb.so: /share/apps/python/anaconda3.2019.3/lib/libQt5Core.so.5: version `Qt_5.13' not found (required by ./libqxcb.so)
                                  linux-vdso.so.1 => (0x00007ffd83f66000)
                                  libQt5XcbQpa.so.5 => /share/apps/python/anaconda3.2019.3/lib/libQt5XcbQpa.so.5 (0x00007fcf99cc3000)
                                  libfontconfig.so.1 => /share/apps/python/anaconda3.2019.3/lib/libfontconfig.so.1 (0x00007fcf99a7e000)
                                  libfreetype.so.6 => /share/apps/python/anaconda3.2019.3/lib/libfreetype.so.6 (0x00007fcf999d2000)
                                  libz.so.1 => /share/apps/python/anaconda3.2019.3/lib/libz.so.1 (0x00007fcf999b2000)
                                  libQt5Gui.so.5 => /share/apps/python/anaconda3.2019.3/lib/libQt5Gui.so.5 (0x00007fcf995e5000)
                                  libQt5DBus.so.5 => /share/apps/python/anaconda3.2019.3/lib/libQt5DBus.so.5 (0x00007fcf99585000)
                                  libQt5Core.so.5 => /share/apps/python/anaconda3.2019.3/lib/libQt5Core.so.5 (0x00007fcf9916e000)
                                  libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fcf98efb000)
                                  libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007fcf98cdf000)
                                  libX11-xcb.so.1 => /share/apps/python/anaconda3.2019.3/lib/libX11-xcb.so.1 (0x00007fcf98cda000)
                                  libxcb.so.1 => /share/apps/python/anaconda3.2019.3/lib/libxcb.so.1 (0x00007fcf98ab0000)
                                  libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007fcf988a5000)
                                  libXext.so.6 => /share/apps/python/anaconda3.2019.3/lib/libXext.so.6 (0x00007fcf98890000)
                                  libX11.so.6 => /share/apps/python/anaconda3.2019.3/lib/libX11.so.6 (0x00007fcf9874c000)
                                  libm.so.6 => /usr/lib64/libm.so.6 (0x00007fcf9844a000)
                                  libxkbcommon-x11.so.0 => /usr/lib64/libxkbcommon-x11.so.0 (0x00007fcf98242000)
                                  libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007fcf98001000)
                                  libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007fcf97dfd000)
                                  libstdc++.so.6 => /share/apps/python/anaconda3.2019.3/lib/libstdc++.so.6 (0x00007fcf97cbc000)
                                  libgcc_s.so.1 => /share/apps/python/anaconda3.2019.3/lib/libgcc_s.so.1 (0x00007fcf97ca7000)
                                  libc.so.6 => /usr/lib64/libc.so.6 (0x00007fcf978e4000)
                                  libgthread-2.0.so.0 => /share/apps/python/anaconda3.2019.3/lib/./libgthread-2.0.so.0 (0x00007fcf978df000)
                                  librt.so.1 => /usr/lib64/librt.so.1 (0x00007fcf976d6000)
                                  libglib-2.0.so.0 => /share/apps/python/anaconda3.2019.3/lib/./libglib-2.0.so.0 (0x00007fcf975b9000)
                                  libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007fcf973a9000)
                                  libxml2.so.2 => /share/apps/python/anaconda3.2019.3/lib/./libxml2.so.2 (0x00007fcf9723e000)
                                  libuuid.so.1 => /share/apps/python/anaconda3.2019.3/lib/./libuuid.so.1 (0x00007fcf9703a000)
                                  libpng16.so.16 => /share/apps/python/anaconda3.2019.3/lib/./libpng16.so.16 (0x00007fcf97000000)
                                  libdbus-1.so.3 => /share/apps/python/anaconda3.2019.3/lib/./libdbus-1.so.3 (0x00007fcf96fac000)
                                  libicui18n.so.58 => /share/apps/python/anaconda3.2019.3/lib/./libicui18n.so.58 (0x00007fcf96b37000)
                                  libicuuc.so.58 => /share/apps/python/anaconda3.2019.3/lib/./libicuuc.so.58 (0x00007fcf96788000)
                                  libicudata.so.58 => /share/apps/python/anaconda3.2019.3/lib/./libicudata.so.58 (0x00007fcf94c88000)
                                  /lib64/ld-linux-x86-64.so.2 (0x0000565509dbb000)
                                  libexpat.so.1 => /share/apps/python/anaconda3.2019.3/lib/libexpat.so.1 (0x00007fcf94c54000)
                                  libxcb-dri3.so.0 => /share/apps/python/anaconda3.2019.3/lib/libxcb-dri3.so.0 (0x00007fcf94a4e000)
                                  libxcb-present.so.0 => /share/apps/python/anaconda3.2019.3/lib/libxcb-present.so.0 (0x00007fcf9484b000)
                                  libxcb-sync.so.1 => /share/apps/python/anaconda3.2019.3/lib/libxcb-sync.so.1 (0x00007fcf94644000)
                                  libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007fcf94440000)
                                  libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007fcf94211000)
                                  libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007fcf93fea000)
                                  libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007fcf93de6000)
                                  libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fcf93be0000)
                                  libxcb-glx.so.0 => /share/apps/python/anaconda3.2019.3/lib/libxcb-glx.so.0 (0x00007fcf939c4000)
                                  libxcb-dri2.so.0 => /share/apps/python/anaconda3.2019.3/lib/libxcb-dri2.so.0 (0x00007fcf937be000)
                                  libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007fcf935b8000)
                                  libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007fcf933a9000)
                                  libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fcf931a4000)
                                  libxcb-xkb.so.1 => /usr/lib64/libxcb-xkb.so.1 (0x00007fcf92f88000)
                                  libpcre.so.1 => /share/apps/python/anaconda3.2019.3/lib/././libpcre.so.1 (0x00007fcf92f3f000)
                                  liblzma.so.5 => /share/apps/python/anaconda3.2019.3/lib/././liblzma.so.5 (0x00007fcf92d19000)

                                  please help me.

                                  1 Reply Last reply
                                  0
                                  • I Offline
                                    I Offline
                                    IagoGV
                                    wrote on 23 Jul 2021, 21:25 last edited by IagoGV
                                    #101

                                    For those who could face the same issue: I also got

                                    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, xcb.      
                                    

                                    when trying to open last release of Dooble web browser (2021.07.05) on debian 10. Checking through export QT_DEBUG_PLUGINS=1 I found that

                                    Cannot load library /opt/dooble/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory) 
                                    QLibraryPrivate::loadPlugin failed on "/opt/dooble/plugins/platforms/libqxcb.so" :
                                    "Cannot load library /opt/dooble/plugins/platforms/libqxcb.so: (libxcb-util.so.1: cannot open shared object file: No such file or directory)" 
                                    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, xcb.      
                                    

                                    After many tries of reinstalling libraries as suggested, finally I found the issue: I had installed libxcb-util0, but I needed libxcb-util1, which is only in the repository of Testing version of Debian 10. Installing it solved my issue.

                                    Thanks for the suggestion of using export QT_DEBUG_PLUGINS=1.

                                    1 Reply Last reply
                                    2
                                    • S SGaist
                                      1 Aug 2018, 12:45

                                      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.

                                      S Offline
                                      S Offline
                                      Salihu
                                      wrote on 21 Aug 2021, 20:35 last edited by
                                      #102

                                      @SGaist Hey, i use a hp chromebook, with a linux development environment. I downloaded the Qt online installer and installed Qt succesfully but when i tried to run it i got this 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, xcb.

                                      can you please help.

                                      S 1 Reply Last reply 21 Aug 2021, 21:26
                                      0
                                      • S Salihu
                                        21 Aug 2021, 20:35

                                        @SGaist Hey, i use a hp chromebook, with a linux development environment. I downloaded the Qt online installer and installed Qt succesfully but when i tried to run it i got this 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, xcb.

                                        can you please help.

                                        S Offline
                                        S Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 21 Aug 2021, 21:26 last edited by
                                        #103

                                        @Salihu hi and welcome to devnet,

                                        Please read the thread, there are already several suggestions made to both find the reason and fix the issue.

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

                                        1 Reply Last reply
                                        1
                                        • A Offline
                                          A Offline
                                          AlekHorak
                                          wrote on 8 Sept 2021, 10:43 last edited by AlekHorak 9 Aug 2021, 11:06
                                          #104

                                          I have same problem on redhat 8
                                          after updating to qt creator 5
                                          and one of solution that i did is to insted of running "/opt/Qt/Tools/QtCreator/bin/qtcreator"
                                          I run "/opt/Qt/Tools/QtCreator/bin/qtcreator.sh"

                                          for icon to work:
                                          cd /usr/local/share/applications
                                          sudo vim org.qt-project.qtcreator.desktop

                                          change this: Exec="/opt/Qt/Tools/QtCreator/bin/qtcreator" %F
                                          to this: Exec="/opt/Qt/Tools/QtCreator/bin/qtcreator.sh" %F

                                          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