我需要 libxmu-dev 和 libxi-dev 才能使用 CMake 运行 OpengGl,但我似乎无法安装它们。
当我运行时,sudo apt install libxmu-dev libxi-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:
libxi-dev : Depends: libxi6 (= 2:1.7.5-1) but 2:1.7.6-1 is to be installed
libxmu-dev : Depends: libxmu6 (= 2:1.1.2-1ubuntu1) but 2:1.1.2-2 is to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题?
答案1
您可以使用 来安装它们。它将建议您使用不同的解决方案来解决依赖关系。接受降级所依赖aptitude
的软件包的解决方案。libxi-dev
libxmu-dev
首先,安装aptitude
:
sudo apt install aptitude
然后,使用以下命令安装你的软件包aptitude
:
sudo aptitude install libxi-dev libxmu-dev
第一个解决方案是:
Keep the following packages at their current version:
1) libxi-dev [Not Installed]
2) libxmu-dev [Not Installed]
Accept this solution? [Y/n/q/?]
做不是接受这个解决方案。这将不会安装你的软件包。输入n
。
下一个解决方案是:
Downgrade the following packages:
1) libxi6 [2:1.7.6-1 (now) -> 2:1.7.5-1 (xenial)]
2) libxmu6 [2:1.1.2-2 (now) -> 2:1.1.2-1ubuntu1 (xenial)]
Accept this solution? [Y/n/q/?]
输入y
接受此解决方案。这将降级libxi6
和libxmu6
,然后安装libxi-dev
和libxmu-dev
。