欢迎来到云服务器

系统配置

CentOS yum update出错的解决办法

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

[[email protected] ~]# 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

[[email protected] ~]# service iptables stop

[[email protected] ~]# nslookup  mirrorlist.centos.org

;; connection timed out; no servers could be reached

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

[[email protected] ~]# vim /etc/resolv.conf

# Generated by NetworkManager

search 38forsbm

nameserver 8.8.8.8

[[email protected] ~]# yum update –y   --更新可以使用。

腾讯云代理

Copyright © 2003-2021 MFISP.COM. 国外vps服务器租用 梦飞云服务器租用 版权所有 粤ICP备11019662号