我正在尝试编译和运行一个 QT 程序。我已经尝试过 windows(无法编译 taglib);我也尝试过 OSX,我编译了,但程序崩溃了,尽管它在我朋友的 ubuntu 上没有崩溃。所以我决定安装 ubuntu。现在我遇到了错误:“ cannot find -lGl
”。我在 Google 上搜索,人们告诉我这样做sudo apt-get install libglu1-mesa-dev
,但它一直给我依赖性错误。我对 ubuntu/linux 不太熟悉。我正在使用最新的 ubuntu(14.04 LTS)。
当我运行时sudo apt-get install libglu1-mesa-dev
,我得到:
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).
然后我运行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
我尝试了 sudo apt-get install libgl-dev,或者其他任何命令(真的),但它们都给了我依赖错误。
答案1
您需要安装libgl1-mesa-dev
才能获取libgl.so
Qt 链接的文件。