gpt4 book ai didi

linux - 无法在亚马逊Linux实例上安装docker

转载 作者:太空宇宙 更新时间:2023-11-04 04:38:14 32 4
gpt4 key购买 nike

我的实例位于此 AMI 上:amzn2-ami-hvm-2.0.20191116.0-x86_64-gp2 (ami-01f14919ba412de34)我想按照这个document安装docker所以这是我的命令的输出:

[ec2-user@ip-10-193-192-42 ~]$ sudo amazon-linux-extras install docker
Installing docker
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Cleaning repos: amzn2-core amzn2extra-docker docker-ce-stable
12 metadata files removed
6 sqlite files removed
0 metadata files removed
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 2.4 kB 00:00
amzn2extra-docker | 1.3 kB 00:00
docker-ce-stable | 3.5 kB 00:00
(1/6): amzn2-core/2/x86_64/group_gz | 2.6 kB 00:00
(2/6): amzn2-core/2/x86_64/updateinfo | 174 kB 00:00
(3/6): docker-ce-stable/x86_64/updateinfo | 55 B 00:00
(4/6): docker-ce-stable/x86_64/primary_db | 37 kB 00:00
(5/6): amzn2extra-docker/2/x86_64/primary_db | 59 kB 00:00
(6/6): amzn2-core/2/x86_64/primary_db | 36 MB 00:00
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 0:18.09.9ce-2.amzn2 will be installed
--> Processing Dependency: runc = 1.0.0 for package: docker-18.09.9ce-2.amzn2.x8 6_64
--> Processing Dependency: containerd = 1.2.6 for package: docker-18.09.9ce-2.am zn2.x86_64
--> Processing Dependency: pigz for package: docker-18.09.9ce-2.amzn2.x86_64
--> Processing Dependency: libcgroup for package: docker-18.09.9ce-2.amzn2.x86_6 4
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.10-3.2.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.i o-1.2.10-3.2.el7.x86_64
---> Package libcgroup.x86_64 0:0.41-21.amzn2 will be installed
---> Package pigz.x86_64 0:2.3.4-1.amzn2.0.1 will be installed
--> Finished Dependency Resolution
Error: Package: containerd.io-1.2.10-3.2.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2:2.74
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Installation failed. Check that you have permissions to install.
[ec2-user@ip-10-193-192-42 ~]$

如何获得这项工作?

编辑

我的实例位于 Autoscaling GRoup 中,因此我终止了前一个实例,并尝试在新实例中进行 docker install:

我必须安装 docker,但是当我运行命令时:

sudo service docker start

我从实例注销并收到错误窗口:

network error: software caused connection abort

知道为什么会发生这种情况吗?

最佳答案

刚刚尝试将 Docker 安装到完全相同的 AMI,一切顺利。我猜您遇到问题是因为名为 docker-ce-stable 的额外存储库。您在 Amazon Linux 2 AMI 上不需要它,因此,一旦您获得新实例的 SSH 访问权限,请执行:

sudo amazon-linux-extras install docker

你应该没问题。

关于linux - 无法在亚马逊Linux实例上安装docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59101980/

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