美文网首页
CentOS yum报错的一般解决方法

CentOS yum报错的一般解决方法

作者: 宇文臭臭 | 来源:发表于2017-08-02 10:14 被阅读0次

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

[root@hbase01-222 ~]# yum search ssh

相关文章

网友评论

      本文标题:CentOS yum报错的一般解决方法

      本文链接:https://www.haomeiwen.com/subject/tzdelxtx.html