【发布时间】:2020-08-08 20:11:30
【问题描述】:
我的内核版本:
[ec2-user@ip-172-31-15-171 ~]$ uname -a
Linux ip-172-31-15-171 4.14.158-101.185.amzn1.x86_64 #1 SMP Tue Dec 24 03:25:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
我试过了,但只得到:
[ec2-user@ip-172-31-15-171 ~]$ sudo yum install -y docker
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 0:19.03.6ce-3.57.amzn1 will be installed
--> Processing Dependency: runc >= 1.0.0 for package: docker-19.03.6ce-3.57.amzn1.x86_64
--> Processing Dependency: containerd >= 1.3.2 for package: docker-19.03.6ce-3.57.amzn1.x86_64
--> Processing Dependency: xfsprogs for package: docker-19.03.6ce-3.57.amzn1.x86_64
--> Processing Dependency: pigz for package: docker-19.03.6ce-3.57.amzn1.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-19.03.6ce-3.57.amzn1.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
--> Processing Dependency: systemd for package: containerd.io-1.2.13-3.1.el7.x86_64
--> Processing Dependency: systemd for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package libseccomp.x86_64 0:2.3.1-2.4.amzn1 will be installed
---> Package pigz.x86_64 0:2.3.3-1.6.amzn1 will be installed
---> Package xfsprogs.x86_64 0:4.5.0-18.23.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: containerd.io-1.2.13-3.1.el7.x86_64 (docker-ce-stable)
Requires: systemd
Error: Package: containerd.io-1.2.13-3.1.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
我google了很多,有人说ami不支持systemctl。我不知道弄清楚。 对于container-selinux,我试过这个,但它也不起作用。
sudo yum install -q -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm
我也试过amazon official document提供的命令
[ec2-user@ip-172-31-15-171 ~]$ sudo amazon-linux-extras install docker
sudo: amazon-linux-extras: command not found
尝试安装它:
[ec2-user@ip-172-31-15-171 ~]$ sudo yum install -y amazon-linux-extras
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package amazon-linux-extras available.
Error: Nothing to do
没有包,这个实例有什么问题!
沮丧。希望对您有所帮助。
【问题讨论】:
-
请注意 Stack Overflow 是针对编程问题而不是一般计算问题。请查看What topics can I ask here? 了解更多详情。问题可能适用于Server Fault 或Unix & Linux,但在发布之前请查看他们的帮助。
标签: linux amazon-web-services docker amazon-ec2