Skip to content

Install Qt From Source

0.Intro

Install Qt from opensouce, via local compile.

Take Qt-5.15.2 as an example.

1.Download

Download Qt-5.15.2 from official site, or from mirror, like UTSC.

wget http://mirrors.ustc.edu.cn/qtproject/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz

2.Install Dependency and Unpack

sudo apt install libX11-dev libXext-dev libXtst-dev -y 
tar -xvf qt-everywhere-src-5.15.2.tar.xz

3.To Directory and Configure

cd qt-everywhere-src-5.15.2
./configure -prefix /usr/local/qt-5.15.2 -opensource -developer-build \
    -confirm-license -nomake tests -nomake examples

4.Make and Install

make -j8
sudo make install

Qt will be installed to /usr/local/qt-5.15.2, due to configure above.

5.Qt install script

REF

[1]. https://qt.io

[2]. http://mirrors.ustc.edu.cn/help/qtproject.html