Qt Creator Compiler Problem on Debian

I correctly installed Qt Creator on my Debian virtual machine, but I get an error when trying to compile the default project Qt: cannot find -lGL . I was looking for a solution on Google, but every solution I found did not help me, even if the problems were almost the same. I would like someone to explain to me what is happening, why is this library not found?

I installed the libglu1-mesa-dev package, but this did not solve the problem. I spent a few days setting up Qt on my machine, but I really have no idea how to solve this library problem?

This Qt: cannot find the -lGL error did not solve my problem.

Output ldconfig -p | Grep GL command:

libGLU.so.1 (libc6) => /usr/lib/i386-linux-gnu/libGLU.so.1 libGLEW.so.1.7 (libc6) => /usr/lib/i386-linux-gnu/libGLEW.so.1.7 libGL.so.1 (libc6, OS ABI: Linux 2.4.20) => /usr/lib/i386-linux-gnu/libGL.so.1 
+1
c ++ qt
Oct 21 '15 at 8:21
source share
1 answer

I found a solution to my problem, so I will share it with all of you.

As I said, I had a problem trying to compile the default project in the Debian Qt Creator cross-compiler.

I was missing two libglu1-mesa-dev and libgl1-mesa-dev libraries

I tried to get them through sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev , but I kept getting W errors : failed to get. and I managed to solve this problem by following these three steps:

  • sudo bash -c 'echo "nameserver 127.0.0.1" → /etc/resolv.conf'
  • Sudo apt-get update
  • sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev

I hope this helps everyone who does not have a library, not just these two!

+1
Oct 22 '15 at 7:02
source share



All Articles