"error: cannot find -lGL" after initial setup of Qt Creator on Linux
-
Most asked question on this forum :)
Searching the internet didn't reveal anything specific to this error,
The problem is the minus sign in -IGL
you should enclose it with commas like that:cannot find "-lGL"
You can try:
sudo apt-get install libglu1-mesa-dev -y Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
source: Install Qt 5 on Ubuntu
-
@mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:
The problem is the minus sign in -IGL
you should enclose it with commas like that:cannot find "-lGL"
I didn't do that, that's copied right out of the error in the compiler window
You can try:
sudo apt-get install libglu1-mesa-dev -y
Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
I'm running Qt5.11.3, not sure if that's still compatible? Better question, will I brake anything installing this?
-
@graniteDev just do a google search, this is a common task. I've done it multiple times too, but I do google all the time again because I've forgot it.
-
@graniteDev said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:
Better question, will I brake anything installing this?
No, it is a packet provided and tested by Ubuntu.
-
Hi,
@graniteDev because that's a question that has been asked a hundred times on this forum and others. If you search for
cannot find lGL
you'll have lots of answers both here and on your favorite search engine. However if you don't drop the-
, search engines will specifically search for answer not containing what follows that sign. -
Hi
Just as a note quoting the actual error also provides tons of links
" error: cannot find -lGL" -
@mpergand said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:
cannot find "-lGL"
Hi I now this thread is quite old but I'm having the same issue with a machine I'm working on in work, unfortunately this machine does not have any internet connection and everythiing we've tried to do to to get it connected to the network has failed. Therefore, we are unable to ran any of those commands to install the missing package 😢. Any suggestions for an offline solution ? any help would be greatly appreciated.
Error:
cannot find -lGL
collect2: error: Id returned 1 exit status -
@Rlynn0618 said in "error: cannot find -lGL" after initial setup of Qt Creator on Linux:
Any suggestions for an offline solution ?
You can use a DVD or mount an image for your Linux distribution and use that as source for installation.
On Debian based distributions you will need to edit /etc/apt/sources.list file.
Fore more information refer to the documentation of your distribution. -
Thanks for replying, I managed to get it using the following command.
[root@localhost ~]# ln -s /usr/lib64/libGL.so.1 /usr/ lib/libGL.so
(solution link: http://c.biancheng.net/view/3901.html)