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
I found codersquirrel's answer very helpful.
Just to add to it.
Do the following:
Run the command below to add the libseccomp2 repository:
Update your apt repository:
Install libseccomp2:
That's all.
I hope this helps
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):For the pure
ubuntu
was not working.I had same issue on ubuntu 16. Almost tried all solution. Following command run for me.
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.
The following command will list you available version list you can try one after another from top to bottom.
Hope this will fix your issue.
You can run
apt --fix-broken install
with no packages or you can specify it.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
fileAfter that i ran
$ sudo apt-get install libseccomp2
And the lib was updated and i perfect installed docker