在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn‘t resolve host ‘mirrorlist.centos.org‘"
Error: Cannot find a valid baseurl for repo: base
在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。
如果配置的DHCP动态网络,则在/etc/resolv.conf文件中添加
nameserver 8.8.8.8
如果是静态网络,则在/etc/sysconfig/network-scripts/ifcfg-eth0文件中添加
DNS1=8.8.8.8
然后重启网络服务,
service network restart
yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法
原文:https://www.cnblogs.com/qinning/p/10495427.html