搞了台VPS,想要装docker,发现死活装不上,各种报错。之前系统是centos6,发现官方现在已经不支持centos6了,遂升级到centos7,然后还是出现下面这个错误。
Error: Package: docker-engine-1.12.3-1.el7.centos.x86_64 (dockerrepo)
Requires: systemd-units
Error: Package: docker-engine-1.12.3-1.el7.centos.x86_64 (dockerrepo)
Requires: libseccomp.so.2()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
经过折腾一翻,已经解决了。
解决方案
- 下载docker的仓库源
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
- 下载docker rpm包
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
- 安装仓库源
sudo yum install docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
- 安装docker-ce
sudo yum install docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
- 启动docker服务
service docker start
- 解决!
其它参考资料
- 官方软件仓库 https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
- centos 6下安装docker方法 https://www.cnblogs.com/skyrim/p/7712556.html