Unsolved cannot find -lGL Error
-
@eswar
After you have verified which distro you have as per @aha_1980's suggestion...Assuming you do have a
locate
with an up-to-date database (sudo updatedb
), copy & paste:locate libGL.so
I'd expect it to come up with something, probably
/usr/lib/x86_64-linux-gnu/libGL.so
. Make sure it does, and whatever path is included on your link path. -
@aha_1980
Hi
I am using linux mint.. Here the console output.DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=19
DISTRIB_CODENAME=tara
DISTRIB_DESCRIPTION="Linux Mint 19 Tara" -
@JonB
Hi
This is the console output for locate libGL.so/usr/lib/libGL.so
/usr/lib/i386-linux-gnu/libGL.so.1
/usr/lib/i386-linux-gnu/libGL.so.1.0.0
/usr/lib/i386-linux-gnu/libGL.so.1.distrib
/usr/lib/x86_64-linux-gnu/libGL.so.1
/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libGL.so.1.distrib
/usr/lib/x86_64-linux-gnu/libGL.so.distribThe library available in this path only . I did the following things.
- Delete the build directory and build again
- Unistall and install the Qt as well
-
@eswar
Then, assuming it will use/usr/lib/libGL.so
via library path, do aldd /usr/lib/libGL.so
and make sure all the dependency libraries exist OK. -
@eswar Do you use 32bit Qt or 64bit?
-
@jsulm
Qt 5.11.2 and 64 bit -
@eswar Do you do anything special in your pro file?
-
@jsulm No changes in pro file
TEMPLATE = app
QT += qml quick
CONFIG += c++11
QT += chartsSOURCES += main.cpp
charts.cppRESOURCES += qml.qrc
Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += targetHEADERS +=
charts.h -
Was this ever resolved?
I was having the same problem just now on Ubuntu 18.04.4 after installing a recent version of the proprietary NVIDIA graphics driver. If I
cd /usr/lib/x86_64-linux-gnu
and look at all the libGL* files, i.e.:bob@bobs-laptop:/usr/lib/x86_64-linux-gnu$ ls -l libGL.so* lrwxrwxrwx 1 root root 14 Mai 10 2019 libGL.so -> libGL.so.1.0.0 <<< broken lrwxrwxrwx 1 root root 14 Jul 5 14:57 libGL.so.1 -> libGL.so.1.7.0 -rwxr-xr-x 1 root root 685848 Jul 5 14:57 libGL.so.1.7.0
The first link is red on black background, which is a broken link (libGL.so.1.0.0 doesn't exist because NVIDIA replaced it with 1.7.0).
So I created symlinks in
/usr/lib
and/usr/lib/x86_64-linux-gnu
, i.e.:sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1.7.0 libGL.so
and then was able to build my project.
-
@Robert-Hairgrove said in cannot find -lGL Error:
Was this ever resolved?
Looks like Ubuntu issue, not Qt