使用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
保存,重啟網絡服務即可。