linux - 无法安装 freeglut3-dev 软件包 linuxmint?

标签 linux opengl freeglut linux-mint

我尝试安装 freeglut 包来使用 #opengl
我安装了 freeglut3 包 但我在尝试安装 freeglut3-dev 包时遇到此错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
freeglut3-dev : Depends: libgl1-mesa-dev or
                          libgl-dev
             Depends: libglu1-mesa-dev but it is not going to be    installed or
                      libglu-dev
             Depends: libxt-dev but it is not going to be installed
             Depends: libxext-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The information of my system

Linux version 3.14.0-031400rc4-generic (apw@gomeisa) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201402232235 SMP Mon Feb 24 03:36:35 UTC 2014

最佳答案

在此处添加答案以记录我如何解决此问题,因为接受的答案对我没有帮助。

当我尝试安装 freeglut3-dev 时,synaptic 说它不需要升级或删除任何东西,但它想卸载几百个软件包,包括诸如pulseaudio 或 libxml2 这样不可能依赖于 glut3-dev 的东西。在命令行上我得到了这个:

> sudo apt-get install freeglut3-dev
The following packages have unmet dependencies:
 freeglut3-dev : Depends: libgl1-mesa-dev or
                          libgl-dev
                 Depends: libglu1-mesa-dev but it is not going to be installed or
                          libglu-dev
E: Unable to correct problems, you have held broken packages.

dpkg 报告没有“保留”软件包。我尝试手动安装 libgl1 和 libglu1,但它们也拒绝安装。最后在 synaptic 中,我检查了 gl1 和 glu1 的依赖项选项卡,发现两者都依赖于已经安装的 mesa-common-dev。我一高兴就重新安装了 mesa-common-dev,这以某种方式神奇地修复了所有依赖项。我能够安装 libgl1-dev、libglu1-dev 和 glut3-dev,没有任何问题。

希望这对某人有帮助。

关于linux - 无法安装 freeglut3-dev 软件包 linuxmint?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28898299/

相关文章:

c - IPC 在 C : Error in receiving 中使用消息队列

python - Pyqtgraph & 根据曲面图的高度更改颜色

c++ - 平坦水面上的法线贴图会产生不正确的镜面高光

c - glutPostRedisplay() 并不总是被调用?

c - 使用 4.2 OpenGL 时,"glGenTextures"返回 1282 错误

c - 如何使用 cmake 和 find_package 在 macOS 上链接到 FreeGlut 而不是 Glut?

linux - 如果 find 不为空,如何显示 true

c - SSE:跨页边界的未对齐加载和存储

linux - 需要修改我的排序管道,使其成为直通(如猫)

c++ - 使用 OpenGL 的 C++ 代码中未解析的外部