yum源失败的解决办法

1.使用curl命令,更新源地址

curl -o /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.aliyun.com/repo/Centos-7.repo

2.可能DNS配置出错

#打开DNS域名解析的配置文件
vi /etc/resolv.conf
# resolv.conf 加入
nameserver 8.8.8.8
# 重启网络服务
/etc/init.d/network restart
# 重新yum安装

原文参考链接: https://blog.csdn.net/zhuan_long/article/details/104733799

原文参考链接: https://blog.csdn.net/qq_70162611/article/details/141968913