我在我的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.
当我运行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
最佳答案
你好吗?
我在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:~#
因为纯ubuntu不起作用.