Qt 5.12: Failed to find "GL/gl.h" in "/usr/include/libdrm"

You need mesa packages.

  • mesa-common-dev
  • libglu1-mesa-dev

$ sudo apt install mesa-common-dev libglu1-mesa-dev
And Try.


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 anybody using Fedora/RHEL finds this question, mesa packages are named differently here.

  • mesa-libGL
  • mesa-libGL-devel

$ sudo dnf install mesa-libGL mesa-libGL-devel

Source: https://access.redhat.com/solutions/56301