赞
踩
安装docker执行yum install docker-ce docker-ce-cli containerd.io
命令时出错
尝试它的提示您可以尝试添加 --skip-broken 选项来解决该问题
yum install docker-ce docker-ce-cli containerd.io --skip-broken
安装完毕
启动docker
systemctl start docker
无法启动
由于尝试一中containerd.io安装成功了,为了防止后面的操作被其影响到,所以先删除尝试一中安装的containerd.io,删除命令:
- #卸载依赖
- yum remove docker-ce docker-ce-cli containerd.io
- #删除资源
- rm -rf /var/lib/docker # docker默认的工作路径
- rm -rf /var/lib/containerd
- cd /etc/yum.repos.d/bak
- mv * ../
vim /etc/yum.repos.d/CentOS-Base.repo
- # CentOS-Base.repo
- #
- # The mirror system uses the connecting IP address of the client and the
- # update status of each mirror to pick mirrors that are updated to and
- # geographically close to the client. You should use this for CentOS updates
- # unless you are manually picking other mirrors.
- #
- # If the mirrorlist= does not work for you, as a fall back you can try the
- # remarked out baseurl= line instead.
- #
- #
-
- [base]
- name=CentOS-$releasever - Base
- baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
- #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
- #released updates
- [updates]
- name=CentOS-$releasever - Updates
- baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
- #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
- #additional packages that may be useful
- [extras]
- name=CentOS-$releasever - Extras
- baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
- #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
- #additional packages that extend functionality of existing packages
- [centosplus]
- name=CentOS-$releasever - Plus
- baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
- #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
- gpgcheck=1
- enabled=0
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
安装docker
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
结束
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。