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 更新软件包列表,这一步带来的效果是自动生成缓存。

3.恢复 CentOS-Base.repo到原始状态(baseurl注释掉,mirrorList取消注释)

4.继续执行sudo yum install xxx 一切恢复正常。

时间: 2024-12-28 05:09:15

Could not retrieve mirrorlist 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

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=

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

【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

CentOS 使用yum命令安装出现错误提示”could not retrieve mirrorlist http://mirrorlist.centos.org ***”

执行yum命令时出现以上错误; 解决方法: vi /etc/sysconfig/network-scripts/ifcfg-eth0 这一段为你的网卡修改图中框框部分 然后重启 :reboot 原文地址:https://www.cnblogs.com/pbblogs/p/9742019.html

解决Couldn't resolve host 'mirrorlist.centos.org

这个错误引起主要是因为环境读取不到yun引起的可以考虑/etc/sysconfig/network-scripts/ifcfg-eth0 配置出错导致网络不通.或者/etc/resolv.conf的DNS配置出错.或者可以考虑清楚yum缓存影响(yum clean all) (下面是网上找到比较有用资料) 今天在linux环境通过yum安装软件报了以下错误: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded 

[原]linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'

问题:[[email protected] ~]# yum -y install gcc-*Loaded plugins: fastestmirror, prestoCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.cent

【转】解决yum安装软件报Couldn't resolve host 'mirrorlist.centos.org问题

转自:http://blog.51cto.com/oldcat1981/1719825 今天在linux环境通过yum安装软件报了以下错误: [[email protected] yum.repos.d]# yum install ncurses devel -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http