Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stoc

 
问题:

[root@host0 ~]# yum repolist
Loaded plugins: axelget, fastestmirror, langpacks, priorities, versionlock
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: HTTP Error 502 - Bad Gateway
repo id                                                repo name                                                                            status
base/7/x86_64                                          CentOS-7 - Base                                                                      0
!epel/x86_64                                           Extra Packages for Enterprise Linux 7 - x86_64                                       0
extras/7/x86_64                                        CentOS-7 - Extras                                                                    0
updates/7/x86_64                                       CentOS-7 - Updates                                                                   0
repolist: 0

cd /etc/yum.repos.d/
一查,是Centos.Base 这个里面的repo ,网上找了一下,没有答案



把http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock 粘贴在浏览器中,  显示结果。
http://centos.ustc.edu.cn/centos/7.1.1503/os/x86_64/
http://ftp.sjtu.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.yun-idc.com/centos/7.1.1503/os/x86_64/
http://mirrors.skyshe.cn/centos/7.1.1503/os/x86_64/
http://mirrors.nwsuaf.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.hust.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.btte.net/centos/7.1.1503/os/x86_64/
http://mirror.bit.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.aliyun.com/centos/7.1.1503/os/x86_64/
http://mirrors.zju.edu.cn/centos/7.1.1503/os/x86_64/

[root@host0 ~]# curl  http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock  -o a.html
 Test mode - must specify ip/cc, arch and repo as parameters



[root@host0 ~]# curl "http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock" -o a.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   528    0   528    0     0    784      0 --:--:-- --:--:-- --:--:--   784
[root@host0 ~]#


[root@host0 ~]#
[root@host0 ~]# cat a.html
http://centos.ustc.edu.cn/centos/7.1.1503/os/x86_64/
http://ftp.sjtu.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.yun-idc.com/centos/7.1.1503/os/x86_64/
http://mirrors.skyshe.cn/centos/7.1.1503/os/x86_64/
http://mirrors.nwsuaf.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.hust.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.btte.net/centos/7.1.1503/os/x86_64/
http://mirror.bit.edu.cn/centos/7.1.1503/os/x86_64/
http://mirrors.aliyun.com/centos/7.1.1503/os/x86_64/
http://mirrors.zju.edu.cn/centos/7.1.1503/os/x86_64/

这个是正常的结果。

想起在yum.conf中配置了proxy(为了访问一些被墙掉的repo) , 去掉, 再试,竟然好了, 之前一直都是好的啊, 不知道为什么,后续再查。





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值