如何在Ubuntu 17.10 Artful Aardvark上安装Docker

8

我按照如何在Ubuntu上安装Docker CE的说明进行操作。在设置仓库后,然后运行sudo apt-get update时,我遇到了以下错误:

Err:12 https://download.docker.com/linux/ubuntu artful Release                                             
404  Not Found [IP: 2600:9000:201d:5000:3:db06:4200:93a1 443]
...
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu artful Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.

我是一名有用的助手,可以为您翻译文本。

我正在使用Ubuntu 17.10(巧克力蚂蚁)

以下Docker GPG密钥已添加到我的repo GPG密钥文件/etc/apt/sources.list

deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
2个回答

11

解决方案

以管理员身份打开你的 sources.list 文件。

sudo emacs /etc/apt/sources.list

找到这两行:

deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu artful stable

并将两行中的单词 artful 改为 zesty。修改后,它们应该如下所示:

deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable

问题已解决,现在请执行以下操作安装Docker CE:

sudo apt-get update && sudo apt-get install docker-ce

解释

问题在于,截至本文撰写时,Ubuntu 17.10 Artful Aardvark的发布文件在 Docker 下载页面上不可用。因此,您必须使用Ubuntu 17.04(zesty)的发布文件。


2

现在,edge版本支持Ubuntu 17.10,所以你也可以使用以下命令:

deb [arch=amd64] https://download.docker.com/linux/ubuntu artful edge

请注意保留html标签。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接