使用Centos进行yum安装的时候提示以下错误:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Courier; color: #28fe14; background-color: #000000; background-color: rgba(0, 0, 0, 0.9)}span.s1 {font-variant-ligatures: no-common-ligatures}
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
解决办法:
vim /etc/resolve.cnf
添加:
nameserver 8.8.8.8 nameserver 202.106.0.20
保存,重启网络服务即可。
网友评论