0

I am using Qt5 in my project, but after I reinstall my Ubuntu 15.04 today, I cannot compile my code in Qt Creator. I got two error messages as

cannot find -lGL
collect2: error: ld returned 1 exit status

Anyone has any idea? I used to solve it by install a library:

sudo apt-get install libglu1-mesa-dev

But it doesn't work for me now. This is what I got from the terminal: The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libglu1-mesa-dev : Depends: libgl1-mesa-dev but it is not going to be installed or
                             libgl-dev
E: Unable to correct problems, you have held broken packages.
zhoudingjiang
  • 73
  • 1
  • 11
  • 1
    It does not seem a Qt issue, but rather an Ubuntu issue... So maybe this is not the right place to ask that... Anyway have your tried googling? You can find a lot of resources about your problem... For example [this](http://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) is the first result I've found... it could be a good starting point for working out your problem – Morix Dev Oct 23 '15 at 05:31
  • 1
    Have you tried to `apt-get install libgl-dev` and `apt-get install libgl1-mesa-dev`? They are required by this package but not automatically installed. (Maybe different default settings in Ubuntu 15?) – Felix Oct 23 '15 at 09:13
  • @Felix, I have, then it says some other dependencies need to be installed. – zhoudingjiang Oct 23 '15 at 12:08
  • "sudo apt-get install libglu1-mesa-dev" only works in Ubuntu 15.04. It doesn't work in 15.10. – zhoudingjiang Oct 23 '15 at 20:51

1 Answers1

0

Since I have seen this:

Cannot start '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

then the solution can be found here: cmake not working, could not exec qmake.

Community
  • 1
  • 1
zhoudingjiang
  • 73
  • 1
  • 11