【发布时间】:2021-09-07 17:29:40
【问题描述】:
我尝试使用以下命令在 Debian 上更新 docker:
sudo apt-get update --allow-releaseinfo-change
但我收到以下错误消息:
Hit:1 http://asi-fs-n.contabo.net/debian buster InRelease
Hit:2 http://asi-fs-n.contabo.net/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 https://download.docker.com/linux/debian buster InRelease [54.0 kB]
Hit:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu docker InRelease
Err:7 https://download.docker.com/linux/ubuntu docker Release
404 Not Found [IP: 13.224.94.87 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu docker 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.
从另一个 StackOverflow 主题看来,我必须更新文件 /etc/apt/sources.list.d/docker.list
我尝试了以下方法(但不起作用):
deb https://get.docker.io/ubuntu docker main
注意到:
- 我使用 Debian 10
- 以下命令打印“buster”:https://download.docker.com/linux/debian
我应该改成类似的东西,而不破坏/破坏我的操作系统吗?
deb https://download.docker.com/linux/debian docker buster
【问题讨论】:
-
源网址不对。我不知道具体是怎么回事。
-
@peterh 确实,但我最后一个 url (download.docker.com) 似乎是正确的。我只是不知道我必须放什么。 Zesty 或 buster,我真的不明白这是什么意思……我不想破坏我的操作系统。看到了吗?
-
Docker 是用 go 编写的,因此它非常独立于发行版。甚至可能甚至一个 redhat docker 也可以在 debian 发行版上运行。此外,所有的 linux 发行版都足够聪明:如果你安装了你不应该安装的东西,然后卸载它,99.999999% 什么都不会发生。这是我的 debian 靶心的 sources.list URL:
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bullseye stable