背景:原来的yum源,无法下载yum包了。新增一个阿里云的(网易163的源失效了,无法使用)
![](https://i-blog.csdnimg.cn/direct/c08844548e634c0ea59034ce3c5f1fe1.png)
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; Unknown error"
处理方式:
1、切换到目录:cd /etc/yum.repos.d
2、下载
wget -O Centos-7.repo https://mirrors.aliyun.com/repo/Centos-7.repo
或
curl -o Centos-7.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3、生成缓存 yum makecache