在 Ubuntu 20.04 LTS(Vmware)上安装 docker 失败

标签 docker ubuntu vmware ubuntu-20.04

我正在使用 https://docs.docker.com/engine/install/ubuntu/ 在 Ubuntu 20.04 上安装 docker在 VMware 上的 Ubuntu 虚拟机中。

但是在运行将存储库添加到 Ubuntu 的命令时。

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

我得到以下错误
Get:1 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]                                                                           
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                 
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                                                                                   
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                             
Ign:6 https://download.docker.com/linux/ubuntu focal InRelease                                             
Err:7 https://download.docker.com/linux/ubuntu focal Release
  404  Not Found [IP: 13.225.7.126 443]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [89.1 kB]
Hit:9 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal 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.

运行命令时
sudo apt-get install docker-ce docker-ce-cli containerd.io

我收到错误
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'

这是什么原因?
我是 docker 的新手。
是否有解决方法,或者我应该使用源代码或其他东西安装 docker?
谢谢你。

最佳答案

目前,您可以使用:

sudo apt-get install -y docker.io

然后检查:
docker -v

关于在 Ubuntu 20.04 LTS(Vmware)上安装 docker 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61401626/

相关文章:

docker - Docker基于if-else设置ENV

docker - 通过Docker部署失败

python - 如何在 Ubuntu 上构建 pysparse

ubuntu - 如何设置 Visual Studio Code 以在 Linux 上调试 C 程序?

docker - Docker + Symfony-缓存警告:无法保存 key

amazon-web-services - 已停止(CannotPullContainerError : API error (500)?

Linux Sudo 用户禁用将目录更改为/

delphi - 使用 VMPlayer 是否可以通过编程方式与主机创建共享文件夹?

virtual-machine - Java中如何与虚拟机通信?

centos - VMWare Tools 在 CentOS 6.7 minimal 上失败并显示 "initctl: Job failed to start"