Trouble with opengl and Qt 5.1



  • I'm trying to build a preexisting project but get the following:
    error: cannot find -lGL

    opengl was added into the .pro file.

    Looking at other posts I tried this:
    sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

    I keep getting this though:
    The following packages have unmet dependencies:
    libgl1-mesa-dev : Depends: libgl1-mesa-glx (= 9.0.1-0ubuntu1~precise)
    E: Unable to correct problems, you have held broken packages.

    Attempting to install glx gives:
    The following packages have unmet dependencies:
    libgl1-mesa-glx : Depends: libglapi-mesa (= 9.0.1-0ubuntu1~precise)

    It tells me libglapi-mesa is already installed and up to date, so I'm at a loss for what to try next.


  • Lifetime Qt Champion

    Hi,

    Did you try to find which package is broken ?



  • No, I really don't know what to do now. This is on Ubuntu and I'm not very familiar with it.



  • Try the package libqt5opengl5-dev



  • I tried that but it just tell me it can't locate the package:

    $ sudo apt-get install libqt5opengl5-dev
    E: Unable to locate package libqt5opengl5-dev

    Was there a different way I was supposed to do it?
    Installing aptitude and using that didn't find it either.


  • Moderators

    Try uninstalling libglapi-mesa (and any other broken packages), and then reinstalling them.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.