Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was 14: HTTP Error 502 - Bad Gateway
CentOS7 官方已经停止维护,需要替换到默认源
https://www.cnblogs.com/kohler21/p/18331060
方法
sudo bash
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
grep -r "http://mirrorlist.centos.org?a" ./ 查找所有可能存在的默认源
打开,修改 enable = 0,或者删除
yum repolist all 查看信息
yun clean all
然后安装所需文件
可以运行
rpm -qa | grep XXXX
查看安装状态
标签:repo,http,CentOS,禁用,CentOS7,Base,换源,mirrorlist From: https://www.cnblogs.com/zxyfrank/p/18659709