当我尝试安装一些与图形相关的软件包(如 libdrm-dev)时,出现奇怪的错误:
$ sudo apt-get install libdrm-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:
libdrm-dev : Depends: libdrm2 (= 2.4.67-1ubuntu0.16.04.2) but 2.4.68+git1606141830.625d18~gd~t is to be installed
Depends: libdrm-intel1 (= 2.4.67-1ubuntu0.16.04.2) but 2.4.68+git1606141830.625d18~gd~t is to be installed
Depends: libdrm-radeon1 (= 2.4.67-1ubuntu0.16.04.2) but 2.4.68+git1606141830.625d18~gd~t is to be installed
Depends: libdrm-nouveau2 (= 2.4.67-1ubuntu0.16.04.2) but 2.4.68+git1606141830.625d18~gd~t is to be installed
E: Unable to correct problems, you have held broken packages.
如果我没看错的话,看起来 libdrm-dev 依赖于其他包,比如 libdrm2,但是安装了旧版本并且需要更新版本。为什么会抛出错误而不是安装这些较新的版本?我如何安装这个包?
我在 Ubuntu 14.04 和 16.04 上都收到此错误。
您正在使用来自 PPA 的那些 libdrm* 包,这些包不提供匹配的 -dev 包(可能是ppa:oibaf/graphics-drivers)。
要求 PPA 的所有者提供缺少的 -dev 包或删除 PPA 并降级到官方 libdrm* 包。