由于 Ubuntu 16.04 xenial 上的 umet 依赖关系,无法安装 docker

由于 Ubuntu 16.04 xenial 上的 umet 依赖关系,无法安装 docker

甚至在 Ubuntu 16.04 机器上安装 docker 之前,在执行一些先决条件步骤时,我遇到了这个无法弄清楚的错误:

[email protected]:~# apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.2.32).
ca-certificates is already the newest version (20170717~16.04.2).
curl is already the newest version (7.47.0-1ubuntu2.14).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libperl-dev : Depends: libperl5.22 (= 5.22.1-9ubuntu0.6) but 5.22.1-9ubuntu0.5aka9.0.4 is to be installed
 libperl5.22 : Breaks: libperl5.22:i386 (!= 5.22.1-9ubuntu0.5aka9.0.4) but 5.22.1-9ubuntu0.6 is to be installed
 libperl5.22:i386 : Depends: perl-modules-5.22:i386 (>= 5.22.1-9ubuntu0.6)
                    Breaks: libperl5.22 (!= 5.22.1-9ubuntu0.6) but 5.22.1-9ubuntu0.5aka9.0.4 is to be installed
 perl : Depends: perl-modules-5.22 (>= 5.22.1-9ubuntu0.6) but 5.22.1-9ubuntu0.5aka9.0.4 is to be installed
        Depends: libperl5.22 (= 5.22.1-9ubuntu0.6) but 5.22.1-9ubuntu0.5aka9.0.4 is to be installed
        Recommends: rename but it is not going to be installed
 software-properties-common : Depends: python3-software-properties (= 0.96.20.9) but 0.96.20.8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
[email protected]:~#

建议命令的输出:

:~# apt policy libperl-dev libperl5.22 perl-modules-5.22 software-properties-common python3-software-properties
libperl-dev:
  Installed: 5.22.1-9ubuntu0.6
  Candidate: 5.22.1-9ubuntu0.6
  Version table:
 *** 5.22.1-9ubuntu0.6 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.22.1-9 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libperl5.22:
  Installed: 5.22.1-9ubuntu0.5aka9.0.4
  Candidate: 5.22.1-9ubuntu0.6
  Version table:
     5.22.1-9ubuntu0.6 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
 *** 5.22.1-9ubuntu0.5aka9.0.4 100
        100 /var/lib/dpkg/status
     5.22.1-9 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
perl-modules-5.22:
  Installed: 5.22.1-9ubuntu0.5aka9.0.4
  Candidate: 5.22.1-9ubuntu0.6
  Version table:
     5.22.1-9ubuntu0.6 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
 *** 5.22.1-9ubuntu0.5aka9.0.4 100
        100 /var/lib/dpkg/status
     5.22.1-9 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
software-properties-common:
  Installed: 0.96.20.8
  Candidate: 0.96.20.9
  Version table:
     0.96.20.9 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
 *** 0.96.20.8 100
        100 /var/lib/dpkg/status
     0.96.20 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
python3-software-properties:
  Installed: 0.96.20.8
  Candidate: 0.96.20.9
  Version table:
     0.96.20.9 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
 *** 0.96.20.8 100
        100 /var/lib/dpkg/status
     0.96.20 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages

任何帮助都将不胜感激,谢谢!

答案1

您似乎从任何第三方存储库或手动下载的档案中获得了某些与上述软件包不兼容的版本。

此存储库(如果曾经是)不再配置,因此我们不再需要禁用它。

但是,我们需要将这些不兼容的软件包恢复/升级到官方 Ubuntu 存储库提供的受支持版本来解决冲突。这通常可以通过在apt的参数中明确指定每个软件包所需的版本来完成:

sudo apt install libperl5.22=5.22.1-9ubuntu0.6 perl-modules-5.22=5.22.1-9ubuntu0.6 software-properties-common=0.96.20.9 python3-software-properties=0.96.20.9

相关内容