歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> CentOS yum報錯的一般解決方法

CentOS yum報錯的一般解決方法

日期:2017/3/3 11:59:10   编辑:Linux技術
centos-yum update問題-103
在centOs上安裝軟件時。提示報錯信息:
Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolvehost 'mirrorlist.centos.org'"
Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras errorwas
14: PYCURL ERROR 6 - "Couldn't resolvehost 'mirrorlist.centos.org'"
Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates errorwas
14: PYCURL ERROR 6 - "Couldn't resolvehost '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 couldbe reached
到這裡發現問題了,我的域名解析不了,yum的配置文件裡指向的域名就識別不了了。重新設置下dns指向。
[root@hbase01-222 ~]# vim /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
Copyright © Linux教程網 All Rights Reserved