linux(CentOS 7)下安裝docker 以及Splash

轉載自:
https://my.oschina.net/u/3546952/blog/1825493
我執行如下命令時報錯:
[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
完成!




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章