“vdpau-va-driver” 在 Ubuntu 16.04 上有未满足的依赖关系,有官方解决方案吗?

“vdpau-va-driver” 在 Ubuntu 16.04 上有未满足的依赖关系,有官方解决方案吗?

几乎所有电视频道上的 Kodi 18.1 都存在延迟。一年前,我在一台机器上检查时,它没有出现延迟(默认安装 16.04,不考虑视频质量,后台没有运行任何其他程序)。

也许我可以看到一些与 vdpau-va-driver 相关的问题:

user@asdf:~$ kodi
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object file: No such file or directory
user@asdf:~$

在包装层面:

root@asdf:~# apt-get install va-driver-all
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:
 va-driver-all : Depends: vdpau-va-driver but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@asdf:~# 
root@asdf:~# 
root@asdf:~# 
root@asdf:~# apt-get install vdpau-va-driver
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:
 vdpau-va-driver : Depends: libva-driver-abi-0.39 or
                            libva-driver-abi-0.31 but it is not installable
E: Unable to correct problems, you have held broken packages.
root@asdf:~# 
root@asdf:~# 
root@asdf:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial
root@asdf:~# 
root@asdf:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@asdf:~# 
root@asdf:~# 
root@asdf:~# 
root@asdf:~# grep ^[a-z] /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://at.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list.d/intellinuxgraphics.list:deb https://download.01.org/gfx/ubuntu/16.04/main xenial main #Intel Graphics drivers
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_8.x xenial main
/etc/apt/sources.list.d/nodesource.list:deb-src https://deb.nodesource.com/node_8.x xenial main
/etc/apt/sources.list.d/skype-stable.list:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/skype-stable.list.save:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-xenial.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial main
root@asdf:~#

问题:官方如何解决这个依赖问题?

已经尝试通过 01.org 使用视频驱动程序更新程序,但由于依赖性问题而停止。在 01.org 尝试之前也存在依赖性问题!

Google 没有给出任何解决方案。我们来找一个吧!

答案1

我遇到了相同的依赖冲突,并使用以下命令对此进行了一些调查

  • 检查包依赖关系
    • 德比安->Ubuntu->小精灵(现行政策)
    • 使用apt-cache depends va-driver-all(取决于)
    • 使用apt-cache rdepends va-driver-all(依赖)
  • 显示已安装的包
    • 使用apt-cache show libva1

笔记:如需简短版本,请滚动至本条目底部。创建以下段落是为了将其作为如何使用 apt-cache apt-get 解决依赖冲突的参考。这绝不是完整的指南,这是我第一次调查 apt 冲突,因此如果我误用或遗漏了某些内容,请发表评论,我很乐意学习!

调查: 让我感到困惑的是,在参考文献中这里(对于 Debian)依赖项是mesa-va-drivervdpau-va-driver。由于我使用的是 ubuntu 并需要此包的 ubuntu 版本,因此我需要存储库这里(ubuntu)。不知何故,在开发 ubuntu 的过程中,依赖项仅对vdpau-va-driver。但是,我已经安装了,如果我正确解释后续输出,mesa-va-driver它显然会中断。vdpau-va-driverapt-cache depends mesa-va-drivers

编辑:偶然发现了 archlinux wiki 上的一个优秀资源,其中简洁地总结了视频加速库。看这里

~ $ sudo apt-cache depends mesa-va-drivers
mesa-va-drivers
  Depends: libva1
  Depends: libc6
  Depends: libdrm-amdgpu1
  Depends: libdrm-nouveau2
  Depends: libdrm-radeon1
  Depends: libdrm2
  Depends: libelf1
  Depends: libexpat1
  Depends: libgcc1
  Depends: libllvm6.0
  Depends: libsensors4
  Depends: libstdc++6
  Depends: libx11-xcb1
  Depends: libxcb-dri2-0
  Depends: libxcb-dri3-0
  Depends: libxcb-present0
  Depends: libxcb-sync1
  Depends: libxcb-xfixes0
  Depends: libxcb1
  Depends: libxshmfence1
  Depends: zlib1g
  Breaks: vdpau-va-driver
  Replaces: vdpau-va-driver
  Enhances: libva1

然后可以看到实际链接的存储库及其依赖项,apt-cache policy vdpau-va-driver并链接到原始 ubuntu 档案

sudo apt-cache depends vdpau-va-driver
vdpau-va-driver
  Depends: libc6
 |Depends: libgl1-mesa-glx
  Depends: <libgl1>
    libgl1-mesa-glx
  Depends: libvdpau1
  Depends: libx11-6
 |Depends: <libva-driver-abi-0.39>
  Depends: <libva-driver-abi-0.31>
  Enhances: libva1
~ $ sudo apt-cache policy vdpau-va-driver
vdpau-va-driver:
  Installed: (none)
  Candidate: 0.7.4-5
  Version table:
     0.7.4-5 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

安装vdpau-va-driversudo apt-get -o Debug::pkgProblemSolver=yes install vdpau-va-driver

~ $ sudo apt-get -o Debug::pkgProblemSolver=yes install vdpau-va-driver
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:
 vdpau-va-driver : Depends: libva-driver-abi-0.39 or
                            libva-driver-abi-0.31 but it is not installable
E: Unable to correct problems, you have held broken packages.

由于缺失而失败libva-driver-abi-0.39.

笔记:这是我已经安装的libva-driver-abi-0.39虚拟包。相应的输出libva1apt-cache policy libva1

~ $ apt-cache policy libva1
libva1:
  Installed: 1.7.3~xenial
  Candidate: 1.7.3~xenial
  Version table:
 *** 1.7.3~xenial 500
        500 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     1.7.0-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     1.7.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

显示我已使用手动将 libva1 安装在我的 apt 源列表添加的存储库中http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial/main

因此,可用版本vdpau-va-driver链接到的存档 ubuntu 版本libva1,即 1.7.0-1,而来自的 kodi 存储库team-xbmc已经有版本 1.7.3,从中看来,vdpau-va-driver到 ubuntu 存档版本的链接需要虚拟包libva-driver-abi-0.31libva-driver-abi-0.39来自,libva1团队-xbmc版本似乎没有提供它,或者至少我的 apt 包管理器找不到它。

综上所述,政策输出呈现出以下链条

mesa-va-驱动程序 (ubuntu)

libva1(小精灵)-> va-驱动程序-全部(小精灵)-> vdpau-va-驱动程序(Ubuntu)-> libva-driver-abi-0.31 或 - 0.39(Ubuntu)-> libva1(Ubuntu) -x-> libva1 已安装(小精灵

~ $ apt-cache policy mesa-va-drivers vdpau-va-driver va-driver-all libva1
mesa-va-drivers:
  Installed: 18.0.5-0ubuntu0~16.04.1
  Candidate: 18.0.5-0ubuntu0~16.04.1
  Version table:
 *** 18.0.5-0ubuntu0~16.04.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     11.2.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
vdpau-va-driver:
  Installed: (none)
  Candidate: 0.7.4-5
  Version table:
     0.7.4-5 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
va-driver-all:
  Installed: (none)
  Candidate: 1.7.3~xenial
  Version table:
     1.7.3~xenial 500
        500 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial/main amd64 Packages
     1.7.0-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     1.7.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
libva1:
  Installed: 1.7.3~xenial
  Candidate: 1.7.3~xenial
  Version table:
 *** 1.7.3~xenial 500
        500 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     1.7.0-1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     1.7.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

我怀疑 xbmc 存储库http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial/main导致了一些依赖冲突或者缺少虚拟包,但也可能是包管理器和本地的一些配置错误。

确定依赖关系: 但是,可以通过以下导致apt-cache rdepends va-driver-all问题的软件包的输出来调查它对你的系统实际上产生了什么影响

~ $ apt-cache rdepends va-driver-all
va-driver-all
Reverse Depends:
 |libva1
 |libva1
 |libva1
~ $ apt-cache depends libva1
libva1
  Depends: libc6
  Breaks: vlc-nox
 |Recommends: va-driver-all
  Recommends: <va-driver>
    i965-va-driver
    mesa-va-drivers
    vdpau-va-driver

包裹移除: 这里显示只libva1需要这个包va-driver-all,但只是作为推荐,这意味着它不应该破坏某些东西,或者在没有它的情况下仍然可以工作。因此,使用

sudo apt-get remove va-driver-all

TL/DR:结论是调查依赖关系,如果没有依赖导致问题的软件包,则删除它。请参阅最后两个命令清单,了解如何调查是否要删除它。

相关内容