couldnt resolve host mirrorlist.centos

 解决centos 6.3 yum安装软件时找不到镜像问题

[root@nagios-server ~]# yum update –y

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

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

14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"

Error: Cannot find a valid baseurl for repo: base

[root@nagios-server ~]# nslookup mirrorlist.centos.org

;; connection timed out; no servers couldbe reached

到这里发现问题了,域名解析不了,yum的配置文件里指向的域名就识别不了了。重新设置下dns指向。


[root@nagios-server ~]# 
vim /etc/resolv.conf

search 38forsbm

nameserver 8.8.8.8

nameserver 218.85.152.99


[root@nagios-server ~]# 
yum update –y --更新可以使用。

内容来自于:http://300second.blog.51cto.com/7582/1329867

 
原文地址:https://www.cnblogs.com/shibazi/p/3634996.html