You could install Qt using the installers provided by Qt. The open source installer can be downloaded here.
Once downloaded (the following assumes the download location is ~/Downloads):
Install Qt
cd ~/Downloads
chmod +x qt-unified-linux-x64-3.0.5-online.run
./qt-unified-linux-x64-3.0.5-online.run
In the "Installation Folder" screen, enter /opt/Qt
.
In the "Select Components" screen, choose the version you would like to install (Qt 5.11.1 used in this example) and tick the "Desktop gcc 64-bit" option.
The installer will request your sudo password during installation.
Configure the System
There are a couple of choices here depending on whether you want to configure the use of the new Qt version system wide or to the current user.
For system wide, create the folder qtchooser
in location /etc/xdg/
(the location used in this example).
For the current user, create the folder qtchooser
in location ~/.config/
.
Create a text file in the qtchooser
folder created in the previous step named default.conf
with the following contents:
/opt/Qt/5.11.1/gcc_64/bin
/opt/Qt/5.11.1/gcc_64/lib
The first line in the file is the path to the Qt binaries and the second is the path to the Qt libraries.
Check the Configuration
qmake -v
If the configuration is working correctly you should see something like:
QMake version 3.1
Using Qt version 5.11.1 in /opt/Qt/5.11.1/gcc_64/lib
add-apt-repository ppa:<ppa_name>
and the I need is this. However, I don't know the ppa name nor how to search for it.apt-get
. The problem is that on 16.04 I don't have the same packages.