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
6 Posts 5 Posters 46.2k 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.
  • A Offline
    A Offline
    arroyjose
    wrote on 30 Aug 2023, 02:23 last edited by
    #1

    Installed Qt on Ubuntu 22.04 LTS. First time installing it on Linux. I created a test project, build and tried running it and got the 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: minimal, minimalegl, xcb, vnc, wayland, offscreen, linuxfb, vkkhrdisplay, wayland-egl, eglfs.

    Searched online but all the things I have tried have not worked. I'm not familiar enough with the locations where the qt installer puts files on Linux.

    P M 2 Replies Last reply 30 Aug 2023, 02:27
    0
    • A arroyjose
      30 Aug 2023, 02:23

      Installed Qt on Ubuntu 22.04 LTS. First time installing it on Linux. I created a test project, build and tried running it and got the 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: minimal, minimalegl, xcb, vnc, wayland, offscreen, linuxfb, vkkhrdisplay, wayland-egl, eglfs.

      Searched online but all the things I have tried have not worked. I'm not familiar enough with the locations where the qt installer puts files on Linux.

      P Offline
      P Offline
      Paul Colby
      wrote on 30 Aug 2023, 02:27 last edited by
      #2

      Hi @arroyjose,

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

      For modern Ubuntu's, I resolve this with:

      sudo apt install libxcb-cursor0
      

      Cheers.

      A 1 Reply Last reply 30 Aug 2023, 02:36
      6
      • P Paul Colby
        30 Aug 2023, 02:27

        Hi @arroyjose,

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

        For modern Ubuntu's, I resolve this with:

        sudo apt install libxcb-cursor0
        

        Cheers.

        A Offline
        A Offline
        arroyjose
        wrote on 30 Aug 2023, 02:36 last edited by
        #3

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

        sudo apt install libxcb-cursor0

        That did it! Wow.

        Thank you so much!

        1 Reply Last reply
        1
        • A arroyjose has marked this topic as solved on 30 Aug 2023, 13:59
        • A arroyjose
          30 Aug 2023, 02:23

          Installed Qt on Ubuntu 22.04 LTS. First time installing it on Linux. I created a test project, build and tried running it and got the 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: minimal, minimalegl, xcb, vnc, wayland, offscreen, linuxfb, vkkhrdisplay, wayland-egl, eglfs.

          Searched online but all the things I have tried have not worked. I'm not familiar enough with the locations where the qt installer puts files on Linux.

          M Offline
          M Offline
          MABNA0001
          wrote on 7 Dec 2023, 20:06 last edited by
          #4

          @arroyjose
          I really appreciate it
          Thank you so much!

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ami01
            wrote on 23 Apr 2024, 05:42 last edited by
            #5

            my error is still not resolved
            error message - (annno) workstation@workstation-HP-Z4-G4-Workstation:~/AutoLabelImg$ python labelImg.py
            QObject::moveToThread: Current thread (0x56375e8f67b0) is not the object's thread (0x563763866bf0).
            Cannot move to target thread (0x56375e8f67b0)

            qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/workstation/anaconda3/envs/annno/lib/python3.7/site-packages/cv2/qt/plugins" 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, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

            Aborted (core dumped)
            I am trying to run AutoLabelImag
            tried everything, please help:)

            J 1 Reply Last reply 23 Apr 2024, 05:48
            0
            • A ami01
              23 Apr 2024, 05:42

              my error is still not resolved
              error message - (annno) workstation@workstation-HP-Z4-G4-Workstation:~/AutoLabelImg$ python labelImg.py
              QObject::moveToThread: Current thread (0x56375e8f67b0) is not the object's thread (0x563763866bf0).
              Cannot move to target thread (0x56375e8f67b0)

              qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/workstation/anaconda3/envs/annno/lib/python3.7/site-packages/cv2/qt/plugins" 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, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

              Aborted (core dumped)
              I am trying to run AutoLabelImag
              tried everything, please help:)

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 23 Apr 2024, 05:48 last edited by
              #6

              @ami01 As always in such situations: set QT_DEBUG_PLUGINS env variable before starting the app and inspect its output to see why exactly the xcb plug-in fails to load. You can also post the output here.
              See: https://doc.qt.io/qt-6/debug.html

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J jsulm referenced this topic on 24 Apr 2024, 05:33

              • Login

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