Aller directement au contenu
  • Catégories
  • Récent
  • Mots-clés
  • Populaire
  • Utilisateurs
  • Groupes
  • Recherche
  • Get Qt Extensions
  • Non résolu
Réduire
Logo
  1. Accueil
  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.

Planifier Épinglé Verrouillé Déplacé Résolu Qt 6
32 Messages 12 Publieurs 102.5k Vues 2 Watching
  • Du plus ancien au plus récent
  • Du plus récent au plus ancien
  • Les plus votés
Répondre
  • Répondre à l'aide d'un nouveau sujet
Se connecter pour répondre
Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
  • JKSHJ JKSH

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

    Features used by QPA backends:
    ...
      xkbcommon .............................. no
      X11 specific:
        XLib ................................. yes
        XCB Xlib ............................. no
        EGL on X11 ........................... yes
        xkbcommon-x11 ........................ no
    ...
    QPA backends:
    ...
      XCB:
        Using system-provided xcb-xinput ..... no
        GL integrations:
          GLX Plugin ......................... no
            XCB GLX .......................... no
          EGL-X11 Plugin ..................... yes
    

    You need "yes" on all of these. "no" means you were missing the dependencies.

    You should:

    1. Clean out your build tree (i.e. delete all files that were not part of the original source code)
    2. Install all the dependencies for Ubuntu at https://wiki.qt.io/Building_Qt_5_from_Git (pay particular attention to the "Libxcb" section)
    3. Run configure again. Make sure you get "yes" on all of the above.
    4. Run make to build Qt.

    You should now have all the XCB-related libraries.

    C Hors-ligne
    C Hors-ligne
    CuriousPan
    a écrit sur dernière édition par
    #21

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

    JKSHJ 1 réponse Dernière réponse
    0
    • C CuriousPan

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

      JKSHJ Hors-ligne
      JKSHJ Hors-ligne
      JKSH
      Moderators
      a écrit sur dernière édition par
      #22

      @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)

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

      C 1 réponse Dernière réponse
      3
      • 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 Hors-ligne
        C Hors-ligne
        CuriousPan
        a écrit sur dernière édition par
        #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 réponse Dernière réponse
        0
        • Z Hors-ligne
          Z Hors-ligne
          Zayn
          a écrit sur dernière édition par
          #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 réponses Dernière réponse
          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 Hors-ligne
            JKSHJ Hors-ligne
            JKSH
            Moderators
            a écrit sur dernière édition par
            #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 réponse Dernière réponse
            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 Hors-ligne
              Z Hors-ligne
              Zayn
              a écrit sur dernière édition par
              #26

              @JKSH Many thanks

              1 réponse Dernière réponse
              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 Hors-ligne
                C Hors-ligne
                corebonts
                a écrit sur dernière édition par
                #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 réponses Dernière réponse
                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 Hors-ligne
                  H Hors-ligne
                  homer9
                  a écrit sur dernière édition par
                  #28

                  @corebonts Thanks ! That's solves the issue

                  JKSHJ 1 réponse Dernière réponse
                  0
                  • H homer9

                    @corebonts Thanks ! That's solves the issue

                    JKSHJ Hors-ligne
                    JKSHJ Hors-ligne
                    JKSH
                    Moderators
                    a écrit sur dernière édition par 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 réponse Dernière réponse
                    1
                    • N Hors-ligne
                      N Hors-ligne
                      NicolasZ
                      a écrit sur dernière édition par NicolasZ
                      #30

                      @corebonts thx for your solution, solved for me now

                      1 réponse Dernière réponse
                      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 Hors-ligne
                        M Hors-ligne
                        mannan_khan
                        a écrit sur dernière édition par
                        #31

                        @corebonts Thanks a lot brother it worked for me.

                        1 réponse Dernière réponse
                        0
                        • A Hors-ligne
                          A Hors-ligne
                          Anuj Srivastava
                          a écrit sur dernière édition par
                          #32

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

                          1 réponse Dernière réponse
                          0
                          • MassiM Massi referenced this topic on

                          • Se connecter

                          • Connectez-vous ou inscrivez-vous pour faire une recherche.
                          • Premier message
                            Dernier message
                          0
                          • Catégories
                          • Récent
                          • Mots-clés
                          • Populaire
                          • Utilisateurs
                          • Groupes
                          • Recherche
                          • Get Qt Extensions
                          • Non résolu