本文首发于个人博客https://kezunlin.me/post/91842b71/,欢迎阅读!
Part-1: Install and Configure Qt5 on Ubuntu 16.04
Series
- Part-1: Install and Configure Qt5 on Ubuntu 16.04
- Part-2: Install and Configure VTK 8.1.0 from source with Qt5 on Ubuntu 16.04
- Part-3: Install and Configure PCL 1.8.1 with vtk qt support on Ubuntu 16.04 from source
- Part-4: Install and Configure PCL 1.8.1 with vtk qt support on windows 10 from source
Guide
- qt: 5.7.0
- qmake: 3.0 based on Qt 5.7.0
- qtcreator: 3.5.1 based on Qt 5.5.1
purge existing qt5 and qt4
sudo apt-get purge qt5-default qtcreator
sudo apt-get purge qt4-designer qt4-dev-tools
install qt57
In addition, building graphical Qt applications requires OpenGL libraries and headers installed. On Ubuntu and other Debian-based Linux systems you can get OpenGL and the minimal set of development tools by installing the packages libgl1-mesa-dev and build-essential, i.e. by running this command:
sudo apt-get install build-essential libgl1-mesa-dev
Download qt and install.
sudo apt-get install build-essential libgl1-mesa-dev
wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
chmod x qt-opensource-linux-x64-5.7.0.run
./qt-opensource-linux-x64-5.7.0.run
install to
/opt/Qt5.7.0
cd /opt
sudo ln -s /opt/Qt5.7.0 qt
add qt bin to path
vim .bashrc
# added by kzl
export PATH=/opt/cuda-8.0/bin:$PATH
export PATH=/opt/MATLAB/R2016b/bin:$PATH
export PATH=/opt/qt/5.7/gcc_64/bin:$PATH
qt.conf for ld.so.conf.d
cd /etc/ld.so.conf.d
sudo vim qt.conf
/opt/qt/5.7/gcc_64/lib
sudo ldconfig
or only install qtcreator (find_package error for `qt5x11extra-config.cmake`)
sudo apt-get install qt5-default qtcreator
sudo apt-get install q