tbo*_*one 5 linux ubuntu apt-get docker
我在虚拟机上安装 docker 时遇到问题。\n我已按照以下步骤操作:
\n1. 旧版本的 Docker 称为 docker、docker.io 或 docker-engine。如果安装了这些,请卸载\n它们:
\nsudo apt-get remove docker docker-engine docker.io containerd runc
2.更新apt包索引
\nsudo apt-get update
3. 安装软件包以允许 apt 通过 HTTPS 使用存储库:
\n sudo apt-get install \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg \\\n lsb-release\n
Run Code Online (Sandbox Code Playgroud)\n4.添加Docker\xe2\x80\x99s官方GPG密钥:
\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
5. 使用以下命令设置稳定存储库:
\n echo \\\n "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]\n https://download.docker.com/linux/ubuntu \\\n $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >\n /dev/null\n
Run Code Online (Sandbox Code Playgroud)\n6.更新apt包索引
\nsudo apt-get update
此时 - 输入 sudo apt-get update 后 - 我收到以下错误
\nroot@xxx:/home/xxx# sudo apt-get update\nHit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu focal InRelease\nHit:2 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates InRelease \nHit:3 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports InRelease \nHit:4 http://security.ubuntu.com/ubuntu focal-security InRelease \nIgn:5 https://download.docker.com/linux/ubuntu \\ InRelease \nErr:6 https://download.docker.com/linux/ubuntu \\ Release\n 404 Not Found [IP: 13.249.137.69 443]\nReading package lists... Done\nE: The repository 'https://download.docker.com/linux/ubuntu \\ Release' does not have a Release file.\nN: Updating from such a repository can't be done securely, and is therefore disabled by default.\nN: See apt-secure(8) manpage for repository creation and user configuration details.\n
Run Code Online (Sandbox Code Playgroud)\n内容/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
有办法解决吗?
\n 归档时间: |
|
查看次数: |
12524 次 |
最近记录: |