参考 [已解决] yum makecache报错:Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64-优快云博客https://blog.youkuaiyun.com/2302_77114273/article/details/142769901命令行 sudo nano /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
# u