yum 安装报错: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; Unknown error”
报错信息如图所示:
解决办法:
配置/etc/resolv.conf
加入如下内容:
nameserver 8.8.8.8 #google 提供的dns服务器
nameserver 8.8.4.4 #google 提供的dns服务器
运行后如图所示: