Ubuntu can't build, I get "cannot find -lGL" error
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ubuntu can't build, I get "cannot find -lGL" error
Hello. I'm trying to build mythtv. I am getting the following error during the "make" process:
/usr/bin/ld: cannot find -lGL
I've installed all kinds of dependencies and packages and now just don't know what to do.
Ubuntu 7.04 desktop is the os.
Does anyone have any ideas what this means? I googled it and found next to nothing except for a couple of guys saying install so and so package which i did.
well it's after the OpenGL library, and to compile against it you need to headers for it. for just mesaGL, install libgl-dev and you should be ok, but are you not aware that mythtv is in apt under ubuntu? no need to compile anything yourself... "sudo apt-get install mythtv"
OK, I tried apt-get install libgl-dev, but it says:
Code:
Package libgl-dev is a virtual package provided by:
libgl1-mesa-swx11-dev 6.5.2-3ubuntu8
libgl1-mesa-dev 6.5.2-3ubuntu8
You should explicitly select one to install.
E: Package libgl-dev has no installation candidate
i tried an apt-get install libgl1-mesa-dev, but it is already installed.
Upon trying atp-get install libgl1-mesa-swx11-dev, i got this:
Code:
The following extra packages will be installed:
libgl1-mesa-swx11
The following packages will be REMOVED:
libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libgl1-mesa-glx-dbg
nvidia-glx ubuntu-desktop xorg
The following NEW packages will be installed:
libgl1-mesa-swx11 libgl1-mesa-swx11-dev
0 upgraded, 2 newly installed, 7 to remove and 99 not upgraded.
Need to get 1961kB of archives.
After unpacking 49.2MB disk space will be freed.
Do you want to continue [Y/n]?
That doesn't look good to me. i don't want to remove that stuff.
Any ideas?
The main reason i'm trying to build it myself is to learn how to do linux builds, also, i want to run the svn version of mythtv.
-Thanks
This message means that ld needs the libGL.la library.
It is provided by the nvidia-glx-dev package.
As I see you already have the nvidia-glx package installed, you only need to add the nvidia-glx-dev package to get the needed file.
I hope that it will be enough to build mythtv.
Unpacking nvidia-glx-dev (from .../nvidia-glx-dev_1%3a1.0.9631+2.6.20.6-16.30_i386.deb) ...
dpkg-divert: `diversion of /usr/lib/libGL.so to /usr/lib/nvidia/libGL.so.xlibmesa by nvidia-glx-dev' clashes with `diversion of /usr/lib/libGL.so to /usr/lib/nvidia/libGL.so.xlibmesa by nvidia-glx'
dpkg: error processing /var/cache/apt/archives/nvidia-glx-dev_1%3a1.0.9631+2.6.20.6-16.30_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-glx-dev_1%3a1.0.9631+2.6.20.6-16.30_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've never seen anything like this. What can i do?
-Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.