当你遇到错误提示
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
如果已经排除了网络问题,那么通常是因为无法访问镜像源服务器。这种情况下,可以通过手动指定一个 CentOS 7 的镜像源来解决问题。例如:
// 下载aliyun镜像源配置文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
// 清除缓存
yum clean all
// 创建缓存
yum makecache
