centos could not retrieve mirrorlist

centos could not retrieve mirrorlist

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

蕃薯耀 2016年6月1日 11:57:56 星期三

http://fanshuyao.iteye.com/

一、问题描述

安装了CentOS-7-x86_64-Minimal-1511.iso后,使用命令

yum install net-tools 或 yum -y install wget

提示could not retrieve mirrorlist

网上找了很多原因都说需要配置/etc/resolv.conf文件,在文件加上

nameserver 8.8.8.8

  但都没有用。

二、解决方法

是进入到/etc/sysconfig/network-script/

修改ifcfg-eno16777736(数字部门可能不一样)这个文件,如下图所示


 

把 onboot 改成yes,如下图

 

然后重启网络

 

再执行命令就可以安装了。

yum -y install wget


 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

蕃薯耀 2016年6月1日 11:57:56 星期三

http://fanshuyao.iteye.com/

猜你喜欢

转载自fanshuyao.iteye.com/blog/2302366