0

I am trying to compile and run a QT program. I have already tried windows (couldn't get taglib to compile); I also tried OSX, I compiled but the program crashes even though it doesn't crash on my friend's ubuntu. So I decided to install ubuntu. Now I face the error: "cannot find -lGl". I googled, and people say to do sudo apt-get install libglu1-mesa-dev, but it keeps giving me dependency errors. I rather unfamiliar with ubuntu/linux. I'm using the latest ubuntu (14.04 LTS).

When I run sudo apt-get install libglu1-mesa-dev, I get:

Reading package lists...Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
 libglu1-mesa-dev : Depends: libgl1-mesa-dev or 
                             libgl-dev
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a 
solution).

Then I run sudo apt-get -f install :

Reading package lists...Done
Building dependency tree
Reading state information... Done
Correcting dependencies ... failed.
The following packages have unmet dependencies:
 libglu1-mesa-dev : Depends: libglu1-mesa (= 8.0.4-0ubuntu0.7) but 9.0.0-2 is installed
                    Depends: libgl1-mesa-dev or
                             libgl1-mesa-dev-lts-quantal but it is not installed or
                             libgl1-mesa-dev-lts-raring but it is not installed or
                             libgl1-mesa-dev-lts-saucy but it is not installed or
                             libgl1-mesa-dev-lts-trusty but it is not installed or
                             libgl-dev
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

I tried sudo apt-get install libgl-dev, or any thing else (really), but they all gave me dependency errors.

2

You need to install libgl1-mesa-dev to get the libgl.so file which Qt links against to.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.