QT6 on Mint (Ubuntu) virtual machine

Let’s just say learning C/C++ has been a desire since my time in the service back in the early 90’s. Well as time went by and life happened, it kind of fell off the radar screen.

Well life is starting to slow down a bit now, and I actually have a personal CW program project I want to work.

Having used several CW programs, plus advising on a couple of CWOps classes I noticed most of the programs are very old and only run on Windows. So one of the design goals is to be able to run it on Windows, Mac and Linux machines. As for the other goals, well they’ll have to wait until I make some progress.

I’ve already installed and test QT6 on my home Mac and Windows box. A linux installation has been on the back burner. I figured no time like the future.

After some trial and error I decided on a Mint linux distribution. Mainly because that is what my online QT class instructor is using. The following are some notes on the build process, issue, and resolutions.

I figured I’d use some of home vSphere environment resources. The target machine will have 2 vCPU, 8 GB Ram, and a 100G Hard Drive. I’m not going to explain how to deploy a machine on vSphere.

Once built, I installed G++ and Mesa OpenGL.

sudo apt install build-essential

Then installed OpenGL following the instructions on this page OpenGL installation.

sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev 

Running glxinfo threw two errors

name of display: localhost:10.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

To fix those errors export LIBGL_ALWAYS_INDIRECT=1, then add it to your .bashrc

name of display: localhost:10.0
display: localhost:10 screen: 0
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)

Now download and install Qt6 community. You can get the current version at qt.io/download. Using a custom install, I only selected Desktop gcc 64bit and QT 5 Compatibility Module to limit the size of the download. Selecting everything will result in a LARGE download (Several Gigs). These two limit the download to around 1G.

Mint has openssl version 3.0+ installed, which is incompatible with the version QT 6 uses. So you’ll need to install version 1.x+. The directions are available on howtoforge.com. I’m going to use the latest 1.1+.

Here is the error you will see in the logs.

qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)

You can get the current openssl version by using the openssl version -a command.

openssl version -a
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

And you will not be able to open the Marketplace in the GUI.

After changing to openssl 1.1+ the marketplace will work properly.

There you go. Down and dirty installation of QT 6 on Mint Cinnamon 2.

73 Dana / NN0G