vi /etc/resolv.conf

添加一个nameserver 8.8.8.8完成

如果不能解决问题,请关闭防火墙,重启网络服务生效即可

service iptables stop

service network restart