百胜PYCURL错误6 – “无法parsing主机'mirrorlist.centos.org'”

我试图重做我的服务器(CentOS版本6.6 [最终] x86_64),现在我得到了以下输出在yum

 [root@server ~]# yum update Loaded plugins: fastestmirror, priorities, security Setting up Update Process Determining fastest mirrors 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'" Error: Cannot find a valid baseurl for repo: base 

因为这是相关的是我的/etc/resolv.conf

 nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver IP ADDRESS nameserver IP ADDRESS search au.sever.com vmware.au.server.com 

这是一个dig的输出

 [root@server ~]# dig @8.8.8.8 www.google.com ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> @8.8.8.8 www.google.com ; (1 server found) ;; global options: +cmd ;; connection timed out; no servers could be reached 

我也运行ifdown eth0 && ifup eth0 ,它似乎已经运行成功

另外我的/etc/named.conf文件是空的。 我不知道为什么和/或要投入什么

我无法ping google.com …

我发现我的问题我的/etc/sysconfig/network-scripts/ifcfg-eth0不正确bootproto设置为none或类似的东西,我把它改成static然后重新启动,一切都联机了。