当前位置: 首页 > news >正文

Linux CentOS更换阿里云源解决Could not retrieve mirrorlist http://mirrorlist.centos.org

Linux CentOS7 更新yum 操作的时候出现这个问题:

Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org

然后我执行

grep -nr "mirrorlist.centos.org"  /etc/yum.repos.d/*

出现

这个问题时可以通过更换为阿里云源解决

1、备份

sudo cp -a /etc/yum.repos.d /etc/yum.repos.d.backup

2、清理原来的配置

sudo rm -f /etc/yum.repos.d/*.repo

3、下载阿里云的yum源配置

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4、清除缓存并生成新的缓存

sudo yum clean all
sudo yum makecache

5、yum更新

yum update


http://www.mrgr.cn/news/23606.html

相关文章:

  • 笔试强训day07
  • 电信AEP平台WEB在线开发经验总结
  • 基于单片机一种风速测量仪的设计
  • 判断语句(C语言)
  • 01:电子移动速度/电阻大小与功率大小
  • (一)NoSQL之 【Redis配置】
  • 比较:#define,const,typedef
  • 为什么HashTable慢? 它的并发度是什么? 那么ConcurrentHashMap并发度是什么?
  • AI在医学领域:HMARL首个多器官诊断AI框架
  • 智能交通(三)——Elsevier特刊推荐
  • Redis中String类型的基本命令
  • 漏洞挖掘 | 某系统中少见的前端登录校验
  • Selenium与Qt应用:自动化与GUI结合实践
  • 【运维方案】信息系统运维方案(Word完整版)
  • 灭火器目标检测数据集 3700张 灭火器 带标注 voc yolo
  • 请解释Java中的深拷贝和浅拷贝的区别。什么是Java中的代理模式?它有什么作用?
  • Ubuntu WSL使用技巧
  • 强大的3款自动爬虫利器,再也不用手撸代码了
  • KubeCon China 回顾|快手的 100% 资源利用率提升:从裸机迁移大规模 Redis 到 Kubernetes
  • replace的详解和常用的案例