Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/ld: cannot find -lGL (Ubuntu 14.04)

I'm trying to build a project created in QT Creator and unfortunately every time I try to compile I get an error. Here is my compiler output:

23:02:20: Running steps for project WallpaperAppQt...
23:02:20: Configuration unchanged, skipping qmake step.
23:02:20: Starting: "/usr/bin/make" 
g++ -m64 -o WallpaperAppQt main.o mainwindow.o moc_mainwindow.o   -L/usr/X11R6/lib64 -lQt5Widgets -L/usr/lib/x86_64-linux-gnu -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [WallpaperAppQt] Error 1
23:02:20: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project WallpaperAppQt (kit: Desktop)
When executing step 'Make'
23:02:20: Elapsed time: 00:00.
like image 946
DeviousKoala Avatar asked Oct 31 '15 03:10

DeviousKoala


1 Answers

You need a package that provides the libGL.so (no version suffix) symlink. In Ubuntu, it's in the libgl1-mesa-dev package. So just do:

sudo apt install libgl1-mesa-dev
like image 155
Wyzard Avatar answered Sep 22 '22 18:09

Wyzard