docker - 在 Debian 10 上更新 docker
问题描述
我尝试使用以下命令更新 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
解决方案
请参阅在 Debian 上安装 Docker 引擎。使用以下命令:
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
推荐阅读
- python - 如何使用消息按钮或链接在 Slack 上发送临时应用程序下载链接 itms-service
- sql - 如何从 SQL 中的单列数据(日期时间格式的登录)中获取每天每小时的平均登录次数?
- oracle-apex - 如何进行计数
- ruby-on-rails - 在 Rails 5 中,我们应该在哪里放置核心扩展或 gem 扩展?
- powerbi - 为 ETL 转换此数据集时遇到问题
- php - 更改不同角色的访问控制
- ruby-on-rails - 带有可选变量的 Rails 部分不起作用
- xml - 为什么 xsl:when 和 xsl:value-of 在这里不起作用?
- php - 关于 Wordpress 和 Buddypress
- django - 无法在我的代码中分配 SimpleLazyObject