刚安装完的centos 6.2系统发现yum仓库更新不了。提示报错信息:

[root@hbase01-222 ~]# yum update

Loaded plugins: aliases, changelog, downloadonly, fastestmirror, kabi, presto, security, tmprepo, verify, versionlock

Loading support for CentOS kernel ABI

Determining fastest mirrors

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'"

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

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

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

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

http://mirrors.163.com/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'"

Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

[root@hbase01-222 ~]# service iptables stop

[root@hbase01-222 ~]# nslookup  mirrorlist.centos.org

;; connection timed out; no servers could be reached

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

[root@hbase01-222 ~]# vim /etc/resolv.conf

# Generated by NetworkManager

search 38forsbm

nameserver 8.8.8.8

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