How to install Qt 6 on WSL2 (Ubuntu)
-
wrote on 22 Jun 2021, 16:51 last edited by
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?
-
Hi,
AFAIK, you should use the online installer to get a pre-built binary distribution.
-
wrote on 30 Oct 2021, 14:05 last edited by
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. -
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.@Dariusz hi, same answer: use the online installer.
-
wrote on 18 Jun 2023, 02:52 last edited by
@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
-
@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
@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