Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127400

When running an application containing Qt under WSL, the error message for missing dependencies is not clear enough

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • QPA: X11/XCB
      • Ubuntu 22.04.4 WSL

      sudo apt update && sudo apt upgrade -y
      cd /tmp
      
      sudo apt install libegl1 libopengl0 libxcb-cursor0 libfontconfig1 libxkbcommon0 libglx0 libnss3 libxcomposite1 libxdamage1 libxrandr2 libxtst6 libxkbfile1 libxcb-xinerama0 -y
      
      sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
      calibre
      
      • At this time, entering `calibre` in Ubuntu WSL will report the following error about qt.
      linghengqian@DESKTOP-96PMLO1:~$ calibre
      qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
      qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
      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, offscreen, xcb, wayland-egl, eglfs, minimalegl, vkkhrdisplay, linuxfb, vnc, wayland.
      
      Aborted
      
      • This error message does not provide a suitable way forward.
      • I logged out and re-initialized this Ubuntu 22.04.4 WSL distribution to test it later, which required installing a few seemingly unrelated GUI applications before I could open `calibre` normally. That is,
      sudo apt update && sudo apt upgrade -y
      sudo apt install gnome-text-editor gimp vlc nautilus x11-apps -y
      cd /tmp
      sudo apt install libopengl0 libxcb-cursor0 -y
      sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
      calibre
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            liaqi Liang Qi
            linghengqian Ling Hengqian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes