问题
centos7如果出现下面问题(我是用的静态代理)
Loading mirror speeds from cached hostfile
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; 未知的错误"
Cannot find a valid baseurl for repo: base/7/x86_64
问题排查
(1)如果ping www.baidu.com 如下可以就是DNS配置没有有问题!
解决方法
进入目录
cd /etc/sysconfig/network-scripts/
ls
找到 ifcfg-ens+数字的文件
,默认数字为33
。
打开该文件
vi ifcfg-ens33