docker - “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'
排序!感谢劳伦斯·切罗内和你们所有人!
解决方案
避免不连贯的过时 YouTube 教程并遵循(复制/粘贴)官方文档。确保您遵循了所有必需的步骤并运行了所有必需的命令。
推荐阅读
- reactjs - 如何使用 React 测试库通过 Ant Design 的 Upload 模拟上传文件?
- python - 我想制作一个可以将pdf发送到我的电子邮件的应用程序
- plantuml - 如何向包含另一个对象的 plantuml 对象添加描述?
- python - 替换字符串列表中给定索引处的部分字符串
- javascript - 我们是否允许在功能组件的 return 之外使用 JSX?
- java - 无法使用 SQLite 数据库和 JDBC 附加第二个数据库
- c - 使用按位运算符重建整数
- api - TFVC api:如何获取文件属性(“可执行文件”和“符号链接”)
- javascript - 反应渲染表 - 将正文数据与标题数据顺序匹配?
- python - 将数据框存储在变量python中