无法在 Ubuntu 18.04 上安装 VLC — 缺少依赖项

无法在 Ubuntu 18.04 上安装 VLC — 缺少依赖项
tio@tio:~$ sudo apt install vlc
[sudo] password for tio: 
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-bin (= 3.0.1-3build1) but it is not going to be installed
       Depends: vlc-plugin-base (= 3.0.1-3build1) but 3.0.2-0ubuntu0.1 is to be installed
       Depends: vlc-plugin-video-output (= 3.0.1-3build1) but 3.0.2-0ubuntu0.1 is to be installed
       Recommends: vlc-l10n (= 3.0.1-3build1) but it is not going to be installed
       Recommends: vlc-plugin-notify (= 3.0.1-3build1) but it is not going to be installed
       Recommends: vlc-plugin-samba (= 3.0.1-3build1) but it is not going to be installed
       Recommends: vlc-plugin-skins2 (= 3.0.1-3build1) but it is not going to be installed
       Recommends: vlc-plugin-video-splitter (= 3.0.1-3build1) but it is not going to be installed
       Recommends: vlc-plugin-visualization (= 3.0.1-3build1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
tio@tio:~$ 

我有 Ubuntu 18.04,其中主存储库和宇宙存储库均处于活动状态。

tio@tio:~$ apt-cache policy vlc vlc-bin vlc-plugin-base vlc-plugin-video-output
vlc:
  Installed: (none)
  Candidate: 3.0.1-3build1
  Version table:
     3.0.1-3build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
vlc-bin:
  Installed: (none)
  Candidate: 3.0.1-3build1
  Version table:
     3.0.1-3build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
vlc-plugin-base:
  Installed: 3.0.2-0ubuntu0.1
  Candidate: 3.0.2-0ubuntu0.1
  Version table:
 *** 3.0.2-0ubuntu0.1 100
        100 /var/lib/dpkg/status
     3.0.1-3build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
vlc-plugin-video-output:
  Installed: 3.0.2-0ubuntu0.1
  Candidate: 3.0.2-0ubuntu0.1
  Version table:
 *** 3.0.2-0ubuntu0.1 100
        100 /var/lib/dpkg/status
     3.0.1-3build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
tio@tio:~$ 

答案1

借助这里的答案,我按照以下方式修复了它:

  1. sudo apt remove vlc*
  2. sudo apt autoclean
  3. sudo apt autoremove
  4. sudo apt install vlc*

非常感谢大家!

答案2

我在 Cosmic i386 上的 Ubuntu 上安装 VLC 时遇到了同样的问题。我无法解决“未满足的依赖关系”,因为“损坏的软件包被保留”;

正在运行终端:(sudo synaptic没有发现任何损坏的软件包)。
仔细检查您的 Ubuntu 版本,确保主存储库和 Universe 存储库处于活动状态。

终端输入:sudo apt install vlc显示以下内容:
以下软件包具有未满足的依赖关系:

vlc : Depends: vlc-bin (= 3.0.4-2build1)
      Depends: vlc-plugin-base (= 3.0.4-2build1)
      Depends: vlc-plugin-video-output (= 3.0.4-2build1)
      Recommends:vlc-l10n (= 3.0.4-2build1)
      Recommends: vlc-plugin-notify (= 3.0.4-2build)
      Recommends: vlc-plugin-samba (= 3.0.4-2build1)
      Recommends: vlc-plugin-skins2 (= 3.0.4-2build1)
      Recommends: vlc-plugin-video-splitter (= 3.0.4-2build1)
      Recommends: vlc-plugin-visualization (= 3.0.4-2build1)

E: Unable to correct problems, you have held broken packages.

为了解决这个问题,我运行了:

sudo apt clean
sudo apt autoclean
sudo apt autoremove
sudo apt update
sudo apt upgrade

我对所有上述依赖项进行了降级,例如

sudo apt install vlc-plugin-base=3.0.4-2build1 (or your specific build number)

对每个依赖项执行此操作然后运行;

sudo apt install vlc* [**The asterisk is the key!**]

任何剩余的缺失依赖项都将被显示,然后您可以降级其他残留依赖项并安装 VLC 及其所有推荐的软件包。

希望这对某些人有帮助,我花了一个星期的时间来解决这个问题。

答案3

这些命令应该可以完成工作。

sudo apt clean
sudo apt autoclean
sudo apt autoremove
sudo apt update
sudo apt upgrade
sudo apt install vlc*

相关内容