我想在 Ubuntu 上安装 VLC,但它不工作,更新了系统,然后升级了它,但它仍然不工作。
为此,我使用了 Ubuntu 软件中心和终端。
在终端中我输入了命令sudo apt-get install vlc
终端给我的错误信息如下。
arif@arifpc:~$ sudo apt-get install vlc
[sudo] password for arif:
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:
vlc : Depends: vlc-nox (= 2.2.0~rc1-1ppa2~trusty) but it is not going to be installed
Depends: libavcodec56 (>= 7:2.4~) but it is not going to be installed
Depends: libgles1-mesa (>= 7.8.1) but it is not installable or
libgles1 but it is not installable
Depends: libsdl-image1.2 (>= 1.2.10) but it is not installable
Depends: libsdl1.2debian (>= 1.2.11) but it is not installable
Depends: libva-drm1 but it is not installable
Depends: libva-x11-1 (> 1.3.0~) but it is not installable
Depends: libva1 (> 1.3.0~) but it is not installable
Depends: libvlccore8 (>= 2.2.0~pre1) but it is not going to be installed
Depends: libxcb-composite0 but it is not installable
Depends: libxcb-xv0 (>= 1.2) but it is not installable
Recommends: vlc-plugin-notify (= 2.2.0~rc1-1ppa2~trusty) but it is not going to be installed
Recommends: vlc-plugin-samba (= 2.2.0~rc1-1ppa2~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
注意:我使用的是 Ubuntu 14.04 LTS
答案1
我从 Ubuntu 14.04 升级到 14.10 后就发生了这种情况。
我找到了这个解决方案这对我很有帮助。
您需要添加xorg-edgers 全新 X 破解版终端中含有此代码的存储库:
sudo add-apt-repository ppa:xorg-edgers/ppa
apt-cache policy libgl1-mesa-glx libglapi-mesa
然后重新启动您的电脑。然后使用以下命令更新存储库并安装 VLC:
sudo apt-get update
sudo apt-get install vlc
答案2
运行以下命令
sudo apt-get -f install
sudo dpkg --configure -a
这应该安装所有缺失的依赖项并配置 dpkg。
答案3
实际上我当天就解决了这个问题,问题出在最近的 archive.ubuntu.com(Ubuntu 存档服务器)上,我将其所有实例(我的情况是 13 个)更改为 us.archive.ubuntu.com,这样就成功了。我更改此设置的配置文件是 /etc/apt/sources.list。
编辑:最近我在 askubuntu 上发现了另一个问题,如果您不想更改 archive.ubuntu 地址,这个问题的接受答案也是一个很好的解决方案。
这就是那个问题。
答案4
通过使用aptitude
我可以解决这个问题。
解决方案
sudo apt install aptitude
sudo aptitude install vlc
现在你必须选择:n
然后终端会输出
Downgrade the following packages:
1) libgl1-mesa-glx [12.0.6-0ubuntu0.16.04.1 (now) -> 11.2.0-1ubuntu2 (xenial
2) libglapi-mesa [12.0.6-0ubuntu0.16.04.1 (now) -> 11.2.0-1ubuntu2 (xenial)]
Accept this solution? [Y/n/q/?] y
现在 aptitude 降级依赖包并安装 vlc。