我执行如下命令时报错:
-
[root@localhost ~]# yum-config-manager > --add-repo > https://download.docker.com/linux/centos/docker-ce.repo
-
-bash: https://download.docker.com/linux/centos/docker-ce.repo: No such file or directory
这里我进入了 /etc/yum.repos.d文件夹下直接下载:
wget https://download.docker.com/linux/centos/docker-ce.repo
然后下载:
yum insall docker-ce.x86_64
我安装时存在一个error:
-
Transaction check error:
-
file /usr/bin/docker from install of docker-ce-18.03.1.ce-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.13.1-63.git94f4240.el7.centos.x86_64
-
file /usr/bin/docker-containerd from install of docker-ce-18.03.1.ce-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.13.1-63.git94f4240.el7.centos.x86_64
-
file /usr/bin/docker-containerd-shim from install of docker-ce-18.03.1.ce-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.13.1-63.git94f4240.el7.centos.x86_64
-
file /usr/bin/dockerd from install of docker-ce-18.03.1.ce-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.13.1-63.git94f4240.el7.centos.x86_64
-
Error Summary
-
-------------
这是因为我下载过旧版本,没有卸载完全,卸载就好了:
-
rpm -e docker-common
-
rpm -e docker-client
如果有依赖关系,可以先卸载依赖关系应用,也可以强制卸载,这里就不多说,自行百度
卸载完成后重新下载:
yum insall docker-ce.x86_64
启动服务:
-
systemctl start docker
-
systemctl enable docker
安装Splash依照原作者一样:
docker pull scrapinghub/splash
完成!
--------------------- 本文来自 cn_honor 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/cn_honor/article/details/80782691?utm_source=copy