Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm installing Docker on my Ubuntu machine and I'm following this tutorial Install Docker Engine on Ubuntu

When I run sudo apt-get install -y docker-ce it does not install Docker on my machine and is giving the 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 I am 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
like image 562
Muhammad Ateek Avatar asked Dec 28 '17 06:12

Muhammad Ateek


3 Answers

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

like image 150
ChenYang Avatar answered Nov 03 '22 10:11

ChenYang


I had the same issue on Ubuntu 16. I almost tried all solutions. The following command runs for me.

sudo apt install docker.io

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

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

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

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

apt-cache madison docker-ce
like image 19
Bhargav Patel Avatar answered Nov 03 '22 09:11

Bhargav Patel


I am on Linux Mint (Ubuntu 16.04 (Xenial Xerus)).

I had the exact same error.

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

I think you require 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 it was not working.

like image 13
Patrik Laszlo Avatar answered Nov 03 '22 09:11

Patrik Laszlo