CentOS yum时出现"Could not retrieve mirrorlist"

问题描述:

CentOS 6.x minimal(最小化) 安装, CentOS yum install net-tools 时出现“Could not retrieve mirrorlist ”,

原因:

网络出现问题

a.修改网络配置

vi /etc/sysconfig/network-script/ifcfg-eth0

动态获取IP配置(可选1):

ONBOOT=yes 

MM_Controlled=no 

BOOTPROTO=dhcp

设置固定IP配置(可选2):

ONBOOT=yes 

MM_Controlled=no 

BOOTPROTO=static 

IPADDR=192.168.1.33 

BROADCAST=192.168.1.255 

NETMASK=255.255.255.0 

GATEWAY=192.168.1.1 

DNS1=192.168.1.1 

DNS2=192.168.1.2

b.重启网络服务

service network restart
时间: 2024-12-18 03:27:44

CentOS yum时出现"Could not retrieve mirrorlist"的相关文章

CentOS yum时出现“Could not retrieve mirrorlist ”的解决办法——resolv.conf的配置

原因:没有配置resolv.conf 解决方法: 到/etc目录下配置resolv.conf加入nameserver IP,如: nameserver 8.8.8.8 nameserver 8.8.4.4 search localdomain 保存再次运行上面命令就可以. 关键一点  serach那一行要在nameserver的后面 CentOS yum时出现"Could not retrieve mirrorlist "的解决办法--resolv.conf的配置,布布扣,bubuko

CentOS yum时出现“Could not retrieve mirrorlist ”的解决的方法——resolv.conf的配置

原因:没有配置resolv.conf 解决方法: 到/etc文件夹下配置resolv.conf增加nameserver IP,如: nameserver 8.8.8.8 nameserver 8.8.4.4 search localdomain 保存再次执行上面命令就能够. 关键一点  serach那一行要在nameserver的后面

CentOS----使用yum命令出现“could not retrieve mirrorlist http://mirrorlist.centos.org ***” - ybq155”

无聊安装了个mini版的32位的CentOS 6.5,进来想安装个东西,yum install emacs 提示什么 Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=

linux命令—使用yum命令时出错,Could not retrieve mirrorlist

当在新的服务器上,使用yum命令时报出Could not retrieve mirrorlist 类似的错误. 如下操作可以解决: 1.操作命令   输入如下命令,打开该文件,可能里边内容是空的. vi /etc/resolv.conf 2.补充内容   在该文件中添加如下内容,保存退出即可.不需要其他操作即可使用yum 命令. #generated by NetworkManager nameserver 8.8.8.8 search localdomain 原文地址:https://www.

【CentOS6.5】安装之DNS配置错误,yum install 软件报错:ERROR 6或者56错误提示”could not retrieve mirrorlist http://mirrorlist.centos.org ***”

刚安装完CentOS,使用yum命令安装一些常用的软件,使用如下命令:yum grouplist | more. 提示如下错误信息: Loaded plugins: fastestmirror Setting up Group Process Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - &quo

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stoc

今天在使用yum安装文件时,出现了以下问题: [email protected] opt]# yum update Loaded plugins: fastestmirror Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 12: Timeout on http://mirrorlist.centos.org

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was

[[email protected] ~]# yum update Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL

Bug Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was

yum -y install gcc 时候报bug: Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 查明主要是DNS设置 原网络设置的为 8.8.8.8 改为最快的DNS即可 3. 再查看/etc/resolv.conf, 若还没有DNS地址则手动添加 # vi /etc/resolv.conf names

Could not retrieve mirrorlist http://mirrorlist.centos.org/?...

在执行命令 sudo yum clean expire-cache 清理完过期的缓存后,再执行yum install 或 update命令都失败了.原因是清理过期缓存结果不该被清理的也删掉了,可能是yum的bug 上面截图中的5种解决办法都不是有效的. 我的解决办法: 1.sudo vim /etc/yum.repos.d/CentOS-Base.repo 将 mirrorList都注释掉,将baseurl都取消注释, :wq 保存修改 2.执行 sudo yum update 更新软件包列表,