Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  14] [ 0]  / answers: 1 / hits: 37939  / 2 Years ago, sun, october 23, 2022, 11:48:18

Currently, Ubuntu 16.04 has Qt up to 5.5.1 while Ubuntu 18.04 has Qt up to 5.9.5. Currently I'm forced to use Ubuntu 16.04, however, I need to use a program that needs Qt 5.9. How could I update Qt to version 5.9.5?






Note that I'm configuring it on a docker container. This means that the solution shouldn't involve GUI.


More From » 16.04

 Answers
6

A second option is to add Qt using a PPA. The example below installs Qt 5.11.1. There are PPA's for other versions if required.



Add the PPA



sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial
sudo apt update


Install Qt



sudo apt install qt511-meta-full


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 following file in location /etc/xdg/qtchooser.



For the current user, create the following file in location ~/.config/qtchooser.



Create a text file in the chosen qtchooser folder named default.conf with the following contents:



/opt/qt511/bin
/opt/qt511/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/qt511/lib

[#7531] Monday, October 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
;