Ubuntu 18.04.1 LTS x64: how to update Qt 5.10 from Qt 5.9.5?

You have the latest version of qt5-default package available from Ubuntu repositories qt5-default (5.9.5+dfsg-0ubuntu1). To install the 5.10.x version you should follow the instructions described on the official website : Install Qt 5 on Ubuntu

The installation file can be downloaded from here.

The 5.10.0 version:

wget http://download.qt.io/official_releases/qt/5.10/5.10.0/qt-opensource-linux-x64-5.10.0.run

The 5.10.1 version:

wget http://download.qt.io/official_releases/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run

to set qt 5.10 as default edit:

sudo nano /usr/lib/x86_64-linux-gnu/qtchooser/default.conf

with the following line (replace $USER with your username):

/home/$USER/Qt5.10.0/5.10.0/gcc_64/bin
/home/$USER/Qt5.10.0/5.10.0/gcc_64/lib

then run:

qtchooser -print-env
qmake -v

.


Qt PPAs are maintained by Stephan Binner on Launchpad:

https://launchpad.net/~beineri

Instructions for updating are listed within each PPA.


I spent several weeks messing with a system level replacement of Qt 5.9.5 on Ubuntu Bionic and it didn't seem feasible without a backport. The qtxxx.run file will install to /opt which is correct but ancillary and would require some environment variable and/or path override. I built some programs against qt in /opt but they didn't work well just because everything wants to use system default.

System Qt is distributed in a wide array of folders that exist in parallel where the /opt is in a tree. This magic appears to happen toward the end of the debuild/backportpackage type process where the rules makes changes to some of the paths stored in files to mesh with Ubuntu's structure. I was unable to backport upstream versions because of chicken and the egg situations where cross-package dependencies fail even with the bootstrapped qmake.

Long story short, at least for me, best to stick with the Qt version that's part of the distro. It is a core item that isn't meant to be either replaced or have multiple versions without very careful testing.

This was my experience but that doesn't mean it's fact. I'd be pleased to hear if anyone had more success.

Tags:

Ubuntu

Qt