在centos6.5上使用yum源安装Apache,报错Loaded plugins: fastestmirror, security Could not retrieve mirrorlist

遇到的问题:安装Apache时报错
Loaded plugins: fastestmirror, security Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 12: Timeout on http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os: (28, ‘Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds’) Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

在centos6.5上使用yum源安装Apache,报错Loaded plugins: fastestmirror, security Could not retrieve mirrorlist_第1张图片
1.后来发现网卡配置信息中没有写入DNS(域名系统),编辑对应的网卡

vim /etc/sysconfig/network-scripts/ifcfg-eth0

免费的域名系统
114.114.114.114
8.8.8.8

在centos6.5上使用yum源安装Apache,报错Loaded plugins: fastestmirror, security Could not retrieve mirrorlist_第2张图片
2.重启网络服务

ifdown ifcfg-eth0
ifup ifcfg-eth0

如果实在实际工作中,最好不要用service network restart。若是自己的电脑做实验,可以使用service network restart。

3.重新下载httpd

yum install httpd

在centos6.5上使用yum源安装Apache,报错Loaded plugins: fastestmirror, security Could not retrieve mirrorlist_第3张图片

你可能感兴趣的:(VMware)