gpt4 book ai didi

linux - Docker 安装问题 (ubuntu 20.04 LTS) - E : The repository 'https://download.docker.com/linux/ubuntu\Release' does not have a Release file

转载 作者:行者123 更新时间:2023-12-04 18:24:52 28 4
gpt4 key购买 nike

我在虚拟机上安装 docker 时遇到问题。
我已按照以下步骤操作:
1. 旧版本的 Docker 被称为 docker、docker.io 或 docker-engine。如果安装了这些,请卸载
他们:
sudo apt-get remove docker docker-engine docker.io containerd runc 2.更新apt包索引sudo apt-get update 3. 安装软件包以允许 apt 通过 HTTPS 使用存储库:

   sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
4.添加Docker官方GPG key : curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg 5. 使用以下命令设置稳定存储库:
   echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >
/dev/null
6.更新apt包索引 sudo apt-get update此时 - 输入 sudo apt-get update 后 - 我收到以下错误
root@xxx:/home/xxx# sudo apt-get update
Hit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:5 https://download.docker.com/linux/ubuntu \ InRelease
Err:6 https://download.docker.com/linux/ubuntu \ Release
404 Not Found [IP: 13.249.137.69 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu \ 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.
/etc/apt/sources.list.d/docker.list的内容 deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] download.docker.com/linux/ubuntu \ focal stable有没有办法解决它?

最佳答案

确保 /etc/apt/sources.list.d/docker.list 的内容对应于 documentation 中命令的输出,项目符号#3。
在撰写本文时,在我的 Ubuntu 20.04 LTS 上执行命令会导致 docker.list 文件的以下内容:deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable这似乎与您的不同。

关于linux - Docker 安装问题 (ubuntu 20.04 LTS) - E : The repository 'https://download.docker.com/linux/ubuntu\Release' does not have a Release file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68712058/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com