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. How to install Qt 6 on WSL2 (Ubuntu)
Forum Updated to NodeBB v4.3 + New Features

How to install Qt 6 on WSL2 (Ubuntu)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 5 Posters 7.8k Views 4 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.
  • vishnuV Offline
    vishnuV Offline
    vishnu
    wrote on last edited by
    #1

    I am developing on visual studio ok windows but I have to cross compile my application for Linux so I used WSL2 . Without qt libs it compiles fine. But the moment I include qt libs in my CMake it fails. How to fix it ? Thanks for the help!

    I tried the following help but didn’t work for Qt 6.

    Re: WSL Qt Ubuntu?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, you should use the online installer to get a pre-built binary distribution.

      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
      • D Offline
        D Offline
        Dariusz
        wrote on last edited by
        #3

        Same question here too. Just starting to expand project in to Linux & Mac so I cover all 3 platforms. How can I install Qt6, is there apt install Qt6 or something like that ?
        I'm totally new to Linux learning commands now... sigh.

        SGaistS 1 Reply Last reply
        0
        • D Dariusz

          Same question here too. Just starting to expand project in to Linux & Mac so I cover all 3 platforms. How can I install Qt6, is there apt install Qt6 or something like that ?
          I'm totally new to Linux learning commands now... sigh.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Dariusz hi, same answer: use the online installer.

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

          H 1 Reply Last reply
          0
          • SGaistS SGaist

            @Dariusz hi, same answer: use the online installer.

            H Offline
            H Offline
            Hyperbo Lee
            wrote on last edited by
            #5

            @SGaist It seems the online installer itself is not able to run on WSL2 (using WSLg). It fails with the following error:

            ./qt-unified-linux-x64-4.6.0-online.run: error while loading shared libraries: libxcb-glx.so.0: cannot open shared object file: No such file or directory
            
            JKSHJ 1 Reply Last reply
            0
            • H Hyperbo Lee

              @SGaist It seems the online installer itself is not able to run on WSL2 (using WSLg). It fails with the following error:

              ./qt-unified-linux-x64-4.6.0-online.run: error while loading shared libraries: libxcb-glx.so.0: cannot open shared object file: No such file or directory
              
              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @Hyperbo-Lee said in How to install Qt 6 on WSL2 (Ubuntu):

              It seems the online installer itself is not able to run on WSL2 (using WSLg).

              Sure it can. It ran fine on my WSL2 instance of Ubuntu 20.04.

              libxcb-glx.so.0: cannot open shared object file: No such file or directory

              This message tells you that a required library is not installed. So the fix is to install it: sudo apt install libxcb-glx0

              But after that, you will probably encounter other missing libraries. These should cover what you need to install and use Qt on Ubuntu:

              sudo apt install g++ make libglu1-mesa-dev libxcb-xinerama0 libxcb-cursor0

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

              1 Reply Last reply
              2

              • Login

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