Bug Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=o

Posted AttitudeY

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Bug Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=o相关的知识,希望对你有一定的参考价值。

yum -y install gcc 时候报bug:

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

查明主要是DNS设置

原网络设置的为 8.8.8.8 改为最快的DNS即可

3. 再查看/etc/resolv.conf, 若还没有DNS地址则手动添加 

# vi /etc/resolv.conf 
 nameserver 192.17.112.21 #==>此地址就是添加的DNS地址

PS:如果个人使用VM的话 改成和你宿机一样的DNS一样即可,什么?宿机你找不到?  cmd->ipconfig/all

以上是关于Bug Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=o的主要内容,如果未能解决你的问题,请参考以下文章