I have a freshly installed Ubuntu 18.04.3
system (NVIDIA) with only Qt SDK 5.12.5
, build-essential
, git
, and CMake
installed. I'm trying to build a Qt project by opening the main CMakeLists.txt in Qt Creator:
Check for working CXX compiler: /usr/bin/g++
Check for working CXX compiler: /usr/bin/g++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at /home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
/home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:174 (include)
/home/juzzlin/Qt/5.12.5/gcc_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:89 (find_package)
CMakeLists.txt:89 (find_package)
What should I still install?
Note: I haven't installed Qt from repositories at all. Only via the official online installer.
You need mesa
packages.
$ sudo apt install mesa-common-dev libglu1-mesa-dev
And Try.
If anybody using Fedora/RHEL finds this question, mesa
packages are named differently here.
$ sudo dnf install mesa-libGL mesa-libGL-devel
Source: https://access.redhat.com/solutions/56301
In OpenSuse Leap mesa
packages are named differently too.
Use:
sudo zypper install Mesa-libGL-devel
to solve it.
I tried it with OpenSuse Leap 15.2 and 15.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With