无法在 16.04 上安装 libdrm-dev

无法在 16.04 上安装 libdrm-dev

当我尝试安装一些与图形相关的软件包(例如 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 上都遇到了这个错误。

答案1

您正在使用的 PPA 中的 libdrm* 软件包没有提供匹配的 -dev 软件包(可能ppa:oibaf/图形驱动程序)。

要求 PPA 的所有者提供缺失的 -dev 软件包或删除 PPA 并降级到官方 libdrm* 软件包。

相关内容