首页 > 解决方案 > “docker.io”在我的 GCP 虚拟机上没有安装候选

问题描述

我正在尝试在我的 GCP 的 VM 上安装 docker,以便按照本教程在我的 VM 上使用 selenium 运行脚本。然而之后

sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io

我有:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker.io is not available, but is referred to 
by another package.
This may mean that the package is missing, has been obs
oleted, or
is only available from another source
E: Package 'docker.io' has no installation candidate

我在 Internet 上找到的所有解决方案都无法解决这个问题,你知道如何在我的 GCP VM 上安装 docker 吗?

如果您需要有关我的 VM 的任何详细信息,请告诉我,...

这是我的操作系统名称和版本:

mikempc3@instance-1:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

这是我的 Linux 内核版本:

mikempc3@instance-1:~$ uname -r
4.9.0-12-amd64

更新

我现在正在关注docs.docker.com 文档。但是我在安装 docker 引擎时遇到了一个问题:

mikempc3@instance-1:~$ sudo apt-get install docker-ce docker-ce-cli co
ntainerd.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another pack
age.
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'

排序!感谢劳伦斯·切罗内和你们所有人!

标签: dockergoogle-cloud-platformvirtual-machine

解决方案


避免不连贯的过时 YouTube 教程并遵循(复制/粘贴)官方文档。确保您遵循了所有必需的步骤并运行了所有必需的命令。


推荐阅读