Qt debian / ubuntu: cannot compile, error: cannot find -lGL

I have a problem creating applications in Qt on Debian.

When I try to compile everything I get:

/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: *** [test] Error 1 14:38:52: Proces "/usr/bin/make" zakończył się kodem wyjściowym 2.

The last line means: Procces(...)comes out with the code:2

Any idea what is wrong?

+4
source share
2 answers

Since this is a linker error, you may have one of two problems:

  • You do not have libGL installed
  • libGL is installed, but not in your system path.

If libGL is not installed, you can install it:

sudo apt-get install libgl1-mesa-dev

I think this is the right package. I do not have a debian machine, so I can not test it.

, . LD_LIBRARY_PATH .conf, /etc/ld.so.conf.d/.

, debian , , . , .

!

+12

, . , , .

, :

sudo apt-get install libgl1-mesa-dev

, , , , , , , .

+1

All Articles