docker-ce : Depends: libseccomp2 (>= 2.3.0) but 2.2.3-3ubuntu3 is to be installed

左心房为你撑大大i 提交于 2020-04-08 00:04:49

问题


im installing docker on my ubuntu machine and im following this tutorial https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#extra-steps-for-aufs

when i run sudo apt-get install -y docker-ce it does not install docker on my machine and giving following error

$ 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.

When i run sudo apt-get install libseccomp2, it already installed in my system and still getting same error when i try to install docker on my machine.

Here is the information of my Ubuntu OS

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

回答1:


I encounter the same problem when installing docker-ce version 18. I won't use aptitude to install the old version because nvidia-docker only supports docker version above 18!

The solution is quite easy:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update

Then you can use command sudo apt-get install docker-ce to solve the libseccomp2 version conflict problem.

Reference: https://gist.github.com/mingrui/187f0e629007443268ce8c1414012ed5




回答2:


I had same issue on ubuntu 16. Almost tried all solution. Following command run for me.

sudo apt install docker.io

But i have noticed that now the latest version are installing using docker-ce. docker.io is older version. But in order to fix the issue you have to find compatible version.

For me the following command is running by specifying version name.

apt install docker-ce=17.12.0~ce-0~ubuntu

The following command will list you available version list you can try one after another from top to bottom.

apt-cache madison docker-ce

Hope this will fix your issue.




回答3:


How are you?

I am in Linux Mint (Ubuntu Xenial).

I had the exact error.

The solution is from here:
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1

I think you are required a specific version like this (I choose the xenial version latest):

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:~# 

For the pure ubuntu was not working.




回答4:


I have same problems on linux mint 18.3 i was install manuall from : http://launchpadlibrarian.net/344879847/libseccomp2_2.3.1-2.1ubuntu2~16.04.1_amd64.deb

i dont remove old version

after install that libseccomp2 install docker-ce work like acharm.




回答5:


The best solution for me was just add the libseccomp2's repo by myself and update the packaged, then i haven't had to change the steps on the dockers site tutorial

I used the link of the debian's package (https://packages.debian.org/pt-br/sid/libseccomp2)

In my case i needed the 2.4 version, so on the Download section i clicked in the amd64 and follow the instruction to simple add deb http://ftp.de.debian.org/debian sid main on the /etc/apt/sources.list file

After that i ran $ sudo apt-get install libseccomp2 And the lib was updated and i perfect installed docker




回答6:


I had a similar problem. I got it over using aptitude instead of apt:

$ sudo aptitude install docker-ce

Skip any solutions and accept the one where it claims to resolve any conflicting dependencies:

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

Let aptitude do its work and it should then install docker-ce.

$ docker --version
Docker version 17.04.0-ce, build 4845c56



回答7:


For Ubuntu 16.04.1 or newer exists libseccomp2 in ver 2.3 in Xenial updates, to install it check if you have checked:

System settings -> Software & updates -> Updates: Recomended updates

Then:

sudo apt update
sudo apt upgrade



回答8:


I get ubuntu server from our ops, have the same issue

When start to digging appears than in file /etc/apt/sources.list are broken urls to packages repos

in my case it was

deb http://ubuntu-mirror/ubuntu/ xenial universe

after change in each line ubuntu-mirror to de.archive.ubuntu.com you will get valid /etc/apt/sources.list file with urls

deb http://de.archive.ubuntu.com/ubuntu/ xenial universe

then

sudo apt update
sudo apt upgrade
sudo apt install -y docker-ce

p.s. ops update old 10.04 to 16.04 and repos after update was brokend




回答9:


sudo apt-get install -y libltdl7 libseccomp2



回答10:


You can run apt --fix-broken install with no packages or you can specify it.



来源:https://stackoverflow.com/questions/48002345/docker-ce-depends-libseccomp2-2-3-0-but-2-2-3-3ubuntu3-is-to-be-installe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!