yum 报错 Could not resolve host: mirrorlist.centos.org

# yum update openssh -y

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

yum 报错 Could not resolve host: mirrorlist.centos.org

解决方法

  • # vim /etc/resolv.conf
  • // 修改如下,添加DNS
  • nameserver 8.8.8.8 (或114.114.114.114)
  • search localdomain 
     
  • 修改之后,重启网络
  •  service network restart

上一篇:centos7 CentOS-Base.repo


下一篇:我是 Flink,现在 “背” 感压力