当我尝试运行示例应用程序时,它说我缺少在 OpenGL 中找到的文件。我在网上找到了信息,并尝试使用以下命令安装 OpenGL:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-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 but it is not going to be installed or
libgl-dev
Depends: libxt-dev but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
libglu1-mesa-dev : Depends: libglu1-mesa (= 8.0.2-0ubuntu3) but 8.0.4-0ubuntu0.4 is to be installed
Depends: libgl1-mesa-dev but it is not going to be installed or
libgl-dev
mesa-common-dev : Depends: libx11-dev but it is not going to be installed
Depends: libdrm-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决 ?
答案1
你只需要做
sudo apt-get install freeglut3-dev
答案2
试试这个:
sudo apt-get install freeglut3 freeglut3-dev
并添加适合较新版本的 Ubuntu 的链接器
sudo apt-get install binutils-gold