解决方法: vi /etc/resolv.conf 添加: nameserver 8.8.8.8 search localadmin 保存退出后重新执行yum即可使用 ps:/etc/resolv.conf是DNS的配置文件