首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新Debian 10上的码头

更新Debian 10上的码头
EN

Stack Overflow用户
提问于 2021-09-07 17:29:40
回答 3查看 4.2K关注 0票数 1

我尝试用以下命令更新Debian上的docker:

代码语言:javascript
复制
sudo apt-get update --allow-releaseinfo-change

但我收到了以下错误消息:

代码语言:javascript
复制
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/ seems es.list.d/docker.list

我尝试了以下方法(但不起作用):

代码语言:javascript
复制
deb https://get.docker.io/ubuntu docker main

注意到:

我是否应该在不破坏/破坏我的操作系统的情况下改变?

代码语言:javascript
复制
deb https://download.docker.com/linux/debian docker buster
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2021-09-08 13:07:30

在Debian上安装Docker引擎。使用以下命令:

代码语言:javascript
复制
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

第一个命令将下载gpg键,第二个命令将调整您的docker.list文件。

然后运行sudo apt update

票数 4
EN

Stack Overflow用户

发布于 2021-09-07 22:57:53

创建以下文件:

代码语言:javascript
复制
$ cat /etc/apt/sources.list.d/docker-ce.list 
deb [arch=amd64] https://download.docker.com/linux/debian buster stable

然后删除/etc/apt/sources.list/etc/apt/sources.list.d/*中的任何其他/etc/apt/sources.list.d/*条目。

票数 1
EN

Stack Overflow用户

发布于 2021-09-07 21:29:25

我曾经在VM上遇到过类似的问题。"https://download.docker.com/linux/ubuntu码头“的回购不存在,需要移除。不知道它为什么会在那里。

这对我起了作用:

  1. 打开源代码列表(如果没有外部源列表): sudo nano /etc/apt/sources.list
  2. 删除Debian 10上"ubuntu“的所有行并保存
  3. 运行sudo apt-get update
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69092380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档