0


安装Docker时,执行yum install -y yum-utils 报错

安装工具时,执行#yum install -y yum-utils时,报错

注意:是服务器连接不到网络,需要配置镜像源

打开etc目录下的配置文件

编辑Centos-Base.repo文件

将内容改为

[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
~

修改后,清除yum缓存

yum clean all

再次执行就可以正常安装

标签: docker 容器 运维

本文转载自: https://blog.csdn.net/m0_56297844/article/details/141062747
版权归原作者 遥遥领先Morris 所有, 如有侵权,请联系我们删除。

“安装Docker时,执行yum install -y yum-utils 报错”的评论:

还没有评论