Install Qt on Ubuntu

The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development environment is still straightforward.

Once installed Qt-creator and the Qt-library, open Qt-creator. In Tools/Options/Kits, you can add a compiler (GCC), debugger (GDB), Cmake and Qt-library (and runtime files and OpenGL libraries) (usually in /usr/bin). Then, you can create a Kit there, which contains these elements (compiler for C and C++, debugger, Cmake, Qt-library) and is used for your projects.

wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
  • Adjust permission.
chmod +x qt-opensource-linux-x64-5.7.0.run
  • Run the installer and follow the instructions. Select to install the IDE (Qt Creator 4.8.2) and the library (Qt 5.12.2).
./qt-opensource-linux-x64-5.7.0.run
  • Install compiler g++.
sudo apt-get install build-essential
  • Install the full runtime files for the generic font configuration library.
sudo apt-get install libfontconfig1
  • Configure a compiler (if it’s not automatically detected): Launch Qt creator and go to “Tools > Options > Build & Run > Kit”.
  • Install OpenGL libraries.
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev -y

Additional installations

sudo apt install g++
sudo apt install gdb
sudo apt install cmake
sudo apt install git

Links

One thought on “Install Qt on Ubuntu

Add yours

Leave a comment

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started