Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Qt 6
32 Posts 12 Posters 100.5k Views 2 Watching
  • 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.
  • JKSHJ JKSH

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

    @JKSH, thank you for response. I will try mentioned steps. But is it relevant for Qt6 too?

    You're welcome.

    Yes, I believe the XCB requirements for Qt 5 and Qt 6 are very similar (or even identical)

    C Offline
    C Offline
    CuriousPan
    wrote on last edited by
    #23

    @JKSH, thank you for your help. Your advice solved my problems. Steps from the link installed dependencies properly and now everything runs perfectly.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zayn
      wrote on last edited by
      #24

      Dears,
      Could you please help? I'm trying to open turtlesim on my Unbutu 20.04 that I installed on my windows10 computer from the Microsoft store and that is what I'm getting

      rosrun turtlesim turtlesim_node
      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, xcb.

      Aborted (core dumped)

      JKSHJ C 2 Replies Last reply
      0
      • Z Zayn

        Dears,
        Could you please help? I'm trying to open turtlesim on my Unbutu 20.04 that I installed on my windows10 computer from the Microsoft store and that is what I'm getting

        rosrun turtlesim turtlesim_node
        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, xcb.

        Aborted (core dumped)

        JKSHJ Online
        JKSHJ Online
        JKSH
        Moderators
        wrote on last edited by
        #25

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

        Unbutu 20.04 that I installed on my windows10 computer from the Microsoft store

        The Windows Subsystem for Linux does not support GUIs. So you cannot run any apps that need XCB.

        You have 2 options:

        • Install a full Ubuntu desktop instead, either on a physical machine or a virtual machine.
        • Wait until WSLg is released to the general public: https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        Z 1 Reply Last reply
        1
        • JKSHJ JKSH

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

          Unbutu 20.04 that I installed on my windows10 computer from the Microsoft store

          The Windows Subsystem for Linux does not support GUIs. So you cannot run any apps that need XCB.

          You have 2 options:

          • Install a full Ubuntu desktop instead, either on a physical machine or a virtual machine.
          • Wait until WSLg is released to the general public: https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/
          Z Offline
          Z Offline
          Zayn
          wrote on last edited by
          #26

          @JKSH Many thanks

          1 Reply Last reply
          0
          • Z Zayn

            Dears,
            Could you please help? I'm trying to open turtlesim on my Unbutu 20.04 that I installed on my windows10 computer from the Microsoft store and that is what I'm getting

            rosrun turtlesim turtlesim_node
            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, xcb.

            Aborted (core dumped)

            C Offline
            C Offline
            corebonts
            wrote on last edited by
            #27

            @Zayn
            I had the same problem running p4merge on WSL2

            First, what you have to do is to install an xserver on windows, like VcXSrv.
            Then create a shortcut for the xserver (optional)

            "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto
            

            Then in Ubuntu set the xserver display in ~/.bashrc

            export DISPLAY=$(ip route | awk '{print $3; exit}'):0
            export LIBGL_ALWAYS_INDIRECT=1
            export XCURSOR_SIZE=16
            

            Then install the xcb dependency (found at https://wiki.qt.io/Building_Qt_5_from_Git )

            sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
            

            Maybe from the last not everything is really needed, but after that it worked for me.

            H M 2 Replies Last reply
            1
            • G gaoyiqin95 referenced this topic on
            • C corebonts

              @Zayn
              I had the same problem running p4merge on WSL2

              First, what you have to do is to install an xserver on windows, like VcXSrv.
              Then create a shortcut for the xserver (optional)

              "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto
              

              Then in Ubuntu set the xserver display in ~/.bashrc

              export DISPLAY=$(ip route | awk '{print $3; exit}'):0
              export LIBGL_ALWAYS_INDIRECT=1
              export XCURSOR_SIZE=16
              

              Then install the xcb dependency (found at https://wiki.qt.io/Building_Qt_5_from_Git )

              sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
              

              Maybe from the last not everything is really needed, but after that it worked for me.

              H Offline
              H Offline
              homer9
              wrote on last edited by
              #28

              @corebonts Thanks ! That's solves the issue

              JKSHJ 1 Reply Last reply
              0
              • H homer9

                @corebonts Thanks ! That's solves the issue

                JKSHJ Online
                JKSHJ Online
                JKSH
                Moderators
                wrote on last edited by JKSH
                #29

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

                @corebonts Thanks ! That's solves the issue

                The workaround posted by @corebonts should no longer be needed. WSL2 now supports GUIs out-of-the-box: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                1
                • N Offline
                  N Offline
                  NicolasZ
                  wrote on last edited by NicolasZ
                  #30

                  @corebonts thx for your solution, solved for me now

                  1 Reply Last reply
                  0
                  • C CPPUIX referenced this topic on
                  • C corebonts

                    @Zayn
                    I had the same problem running p4merge on WSL2

                    First, what you have to do is to install an xserver on windows, like VcXSrv.
                    Then create a shortcut for the xserver (optional)

                    "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto
                    

                    Then in Ubuntu set the xserver display in ~/.bashrc

                    export DISPLAY=$(ip route | awk '{print $3; exit}'):0
                    export LIBGL_ALWAYS_INDIRECT=1
                    export XCURSOR_SIZE=16
                    

                    Then install the xcb dependency (found at https://wiki.qt.io/Building_Qt_5_from_Git )

                    sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
                    

                    Maybe from the last not everything is really needed, but after that it worked for me.

                    M Offline
                    M Offline
                    mannan_khan
                    wrote on last edited by
                    #31

                    @corebonts Thanks a lot brother it worked for me.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Anuj Srivastava
                      wrote on last edited by
                      #32

                      Thanks corebonts the solution to install '^libxcb' worked for me my application is running smoothly in ubuntu

                      1 Reply Last reply
                      0
                      • MassiM Massi referenced this topic on

                      • Login

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