无法在 Ubuntu 15.10 上安装 VLC

无法在 Ubuntu 15.10 上安装 VLC

大约一个月前,我从 14 升级到了 15.10,但最终丢失了 VLC。

现在,当我尝试安装 VLC

$ sudo apt-get install vlc
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 resolve the situation:

The following packages have unmet dependencies:
 vlc : Depends: libgles1-mesa (>= 7.8.1) but it is not going to be installed or
                libgles1
E: Unable to correct problems, you have held broken packages.

为了找出无法安装 libgles1 的原因,我尝试安装它

$ sudo apt-get install libgles1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libgles1-mesa' instead of 'libgles1'
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 resolve the situation:

The following packages have unmet dependencies:
 libgles1-mesa : Depends: libglapi-mesa (= 11.0.2-1ubuntu4)
E: Unable to correct problems, you have held broken packages.

我再次尝试安装依赖项

$ sudo apt-get install libglapi-mesa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglapi-mesa is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

由于已经安装,我检查了版本

$ sudo apt-cache policy libglapi-mesa
libglapi-mesa:
  Installed: 11.0.4~git20151026+11.0.ec14e6f8-0ubuntu0ricotz~trusty
  Candidate: 11.0.4~git20151026+11.0.ec14e6f8-0ubuntu0ricotz~trusty
  Version table:
 *** 11.0.4~git20151026+11.0.ec14e6f8-0ubuntu0ricotz~trusty 0
        100 /var/lib/dpkg/status
     11.0.2-1ubuntu4 0
        500 http://ca.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages

事实证明我拥有的 libglapi-mesa 版本比 libgles1 想要的要新。

我该怎么办?我不太清楚 apt-cache policy 输出的含义,但它似乎表明有一个已知的 11.0.2 版本。我应该考虑回滚到该版本吗?


更新:

我之所以拥有较新版本的 libglapi-mesa,是因为不久前我安装了 steam,它要求我将 libgl1-mesa-glx 升级到 11.0.4,而后者依赖于 libglapi-mesa 11.0.4。此后我删除了 Steam,因此决定将软件包回滚到标准版本。

$ sudo apt-get install libgl1-mesa-glx=11.0.2-1ubuntu4 libglapi-mesa=11.0.2-1ubuntu4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libx11-xcb1:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
  libxshmfence1:i386 libxxf86vm1:i386
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libgl1-mesa-dev libgl1-mesa-glx:i386 libglapi-mesa:i386 libgles2-mesa libglu1-mesa-dev libqt4-opengl-dev
The following packages will be DOWNGRADED:
  libgl1-mesa-glx libglapi-mesa
0 upgraded, 0 newly installed, 2 downgraded, 6 to remove and 3 not upgraded.
...

VLC 现已安装完毕

$ sudo apt-get install vlc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdrm-dev libpthread-stubs0-dev libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1:i386 libxau-dev
  libxcb-dri2-0:i386 libxcb-dri2-0-dev libxcb-dri3-0:i386 libxcb-dri3-dev libxcb-glx0:i386 libxcb-glx0-dev
  libxcb-present-dev libxcb-present0:i386 libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-sync1:i386 libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev
  libxshmfence-dev libxshmfence1:i386 libxxf86vm-dev libxxf86vm1:i386 mesa-common-dev x11proto-core-dev
  x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev
  x11proto-xext-dev x11proto-xf86vidmode-dev xorg-sgml-doctools xtrans-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libgles1-mesa libgles2-mesa libqt5x11extras5 libva-drm1 libva-x11-1 libxcb-composite0 libxcb-xv0 vlc-plugin-notify
  vlc-plugin-samba
Suggested packages:
  videolan-doc
The following NEW packages will be installed:
  libgles1-mesa libgles2-mesa libqt5x11extras5 libva-drm1 libva-x11-1 libxcb-composite0 libxcb-xv0 vlc
  vlc-plugin-notify vlc-plugin-samba
0 upgraded, 10 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,571 kB of archives.

我认为最有趣的事情可能是在升级到 Wily 之前,VLC 可以与 libglapi-mesa 11.0.4 版本配合使用。我怀疑现在 VLC 已经安装好了,如果我再次需要它们,我可以升级到 11.0.4 而不会破坏 VLC。

相关内容