install-qt5-from-sources-centos7


# - Make sure you have a recent GCC compiler supporting, at least, C++11

# install dependencies
sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel libxkbcommon-devel libxkbcommon-x11-devel
sudo yum install xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel
# install MESA libs if you don't have NVidia drivers installed
#sudo yum install mesa-libGL-devel

# get the code and extract
wget http://download.qt.io/official_releases/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz
tar -xvf qt-everywhere-src-5.15.0.tar.xz
# out-of-source build
mkdir buildqt5
cd buildqt5
../qt-everywhere-src-5.15.0/configure -opensource -confirm-license -xcb -xcb-xlib -bundled-xcb-xinput
make -j
# Install Qt5. By default, it will be installed under `/usr/local/Qt-5.15.0`.
# (Reconfigure the build with ./configure -prefix=<path> if you want to install it into another folder)
sudo make install

# Now, in order to use the newly installed Qt5, you have to instruct the environemnt to use it.
export PATH=/usr/local/Qt-5.15.0/bin:$PATH  # for bash shell

# Test
qmake --version
# You should see:
#    QMake version 3.1
#    Using Qt version 5.15.0 in /usr/local/Qt-5.15.0/lib

# Notes:
# - if you want to rebuild Qt5, make sure you clean the build folder first (or create a new build folder);
# otherwise, the build is misconfigured and you get compilation errors or missing files in the installation
# (a missing `qmake` from the `/usr/local/Qt-5.15.0/bin` installation folder is a symptom of that...)

@chinamore

 


Powered By Z-BlogPHP 1.5.2 Zero

175.es

. theme by Plat together