docker-ce:取决于:libseccomp2(> = 2.3.0)但是要安装2.2.3-3ubuntu3

Muh*_*eek 19 ubuntu docker docker-compose ubuntu-16.04 docker-engine

我在我的ubuntu机器上安装docker并且我正在学习本教程 https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#extra-steps-for-aufs

当我运行sudo apt-get install -y docker-ce时,它不会在我的机器上安装docker并给出以下错误

$ sudo apt-get install -y docker-ce
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:
 docker-ce : Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

当我运行sudo apt-get install libseccomp2时,它已经安装在我的系统中,当我尝试在我的机器上安装docker时仍然会出现相同的错误.

这是我的Ubuntu操作系统的信息

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Run Code Online (Sandbox Code Playgroud)

Che*_*ang 18

在安装docker-ce版本18时遇到相同的问题。我不会使用aptitude安装旧版本,因为nvidia-docker仅支持18以上的docker版本!

解决方案非常简单:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

然后可以使用命令sudo apt-get install docker-ce解决libseccomp2版本冲突问题。

参考:https : //gist.github.com/mingrui/187f0e629007443268ce8c1414012ed5


Pat*_*zlo 13

你好吗?

我在Linux Mint(Ubuntu Xenial).

我有确切的错误.

解决方案来自:https:
//docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1

我认为您需要这样的特定版本(我选择xenial最新版本):

patrikx3@workstation:~$ sudo -i
[sudo] password for patrikx3: 
root@workstation:~# apt-cache madison docker-ce
 docker-ce | 17.12.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.12.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.09.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.09.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.2~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.06.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.2~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.1~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
 docker-ce | 17.03.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
root@workstation:~# apt install docker-ce=17.03.2~ce-0~ubuntu-xenial
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docker-ce is already the newest version (17.03.2~ce-0~ubuntu-xenial).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@workstation:~# 
Run Code Online (Sandbox Code Playgroud)

因为纯粹的ubuntu不起作用.


Bha*_*tel 12

我在ubuntu 16上遇到了同样的问题.几乎尝试了所有解决方案.以下命令为我运行.

sudo apt install docker.io
Run Code Online (Sandbox Code Playgroud)

但我注意到现在最新版本正在使用docker-ce进行安装.docker.io是旧版本.但为了解决这个问题,你必须找到兼容的版本.

对我来说,通过指定版本名称运行以下命令.

apt install docker-ce=17.12.0~ce-0~ubuntu
Run Code Online (Sandbox Code Playgroud)

以下命令将列出可用的版本列表,您可以从上到下依次尝试.

apt-cache madison docker-ce
Run Code Online (Sandbox Code Playgroud)

希望这能解决您的问题.


小智 7

对我来说最好的解决方案是自己添加 libseccomp2 的存储库并更新包,然后我不必更改 Docker 站点教程中的步骤。

我使用了 Debian 软件包的链接(https://packages.debian.org/pt-br/sid/libseccomp2)。

就我而言,我需要 2.4 版本,因此在下载部分,我单击了amd64并按照说明简单地添加 deb http://ftp.de.debian.org/debian sid main /etc/apt/sources.list 文件中。

之后我跑了:

$ sudo apt-get install libseccomp2

库已更新,我完美地安装了 Docker。


Pam*_*uda 5

我在Linux Mint 18.3上遇到了同样的问题。我是从以下位置手动安装的:http : //launchpadlibrarian.net/344879847/libseccomp2_2.3.1-2.1ubuntu2~16.04.1_amd64.deb

我没有删除旧版本。

安装 libseccomp2 后,安装 docker-ce 就像一个魅力。


Pro*_*ton 5

我发现codersquirrel 的回答非常有帮助。

只是为了添加它。

执行以下操作

运行以下命令以添加 libseccomp2 存储库:

add-apt-repository "deb http://ftp.de.debian.org/debian sid main"
Run Code Online (Sandbox Code Playgroud)

更新您的 apt 存储库:

apt-get update
Run Code Online (Sandbox Code Playgroud)

安装 libseccomp2:

apt-get install libseccomp2
Run Code Online (Sandbox Code Playgroud)

就这样。

我希望这有帮助


rit*_*iek 4

我有类似的问题。我用它aptitude代替了apt

$ sudo aptitude install docker-ce
Run Code Online (Sandbox Code Playgroud)

跳过任何解决方案并接受它声称可以解决任何冲突的依赖项的解决方案:

The following actions will resolve these dependencies:

     Install the following packages:                    
1)     docker-ce [17.04.0~ce-0~debian-stretch (stretch)]



Accept this solution? [Y/n/q/?] y
Run Code Online (Sandbox Code Playgroud)

让其aptitude完成工作,然后就可以安装了docker-ce

$ docker --version
Docker version 17.04.0-ce, build 4845c56
Run Code Online (Sandbox Code Playgroud)