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

关于7月1号centos官方停止维护7系列版本导致centos7+版本的机器yum等命令无法使用的解决教程

更换yum源两种方式

第一种
在还能使用yum等命令的情况是执行下面的命令
注意:阿里云和腾讯云二选一即可

一丶
yum源

腾讯云:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
任选一条执行即可

阿里云:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
任选一条执行即可

二丶
epel源
腾讯云:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
任选一条执行即可

阿里云:
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
任选一条执行即可

三丶
清理yum缓存
yum clean all

更新yum缓存
yum makecache

第二种
不能使用命令更换yum源等情况下
注意:阿里云和腾讯云二选一即可

一丶
将压缩包里的文件上传到服务器的/etc/yum.repos.d/目录,然后执行下面的步骤命令

二丶
清理yum缓存
yum clean all

更新yum缓存
yum makecache

http://www.lryc.cn/news/394765.html

相关文章:

  • 2024人工智能大会_强化学习论坛相关记录
  • Android SurfaceFlinger——创建EGLContext(二十五)
  • python 10个自动化脚本
  • 填报高考志愿,怎样正确地选择大学专业?
  • Java 使用sql查询mongodb
  • WIN32核心编程 - 线程操作(二) 同步互斥
  • web自动化(六)unittest 四大组件实战(京东登录搜索加入购物车)
  • 鸿蒙语言基础类库:【@ohos.process (获取进程相关的信息)】
  • 华为笔试题
  • 【MySQL基础篇】函数及约束
  • YOLOv9报错:AttributeError: ‘list‘ object has no attribute ‘view‘
  • Bert入门-使用BERT(transformers库)对推特灾难文本二分类
  • 【DFS(深度优先搜索)详解】看这一篇就够啦
  • java-spring boot光速入门教程(超详细!!)
  • 一、Prometheus和Grafana搭建
  • 从零开始的python学习生活
  • MSP学习
  • 生产力工具|Endnote X9如何自动更新文件信息
  • 【python】字典、列表、集合综合练习
  • 超融合服务器挂载硬盘--linux系统
  • Kafka如何防止消息重复发送
  • 数据库设计原则介绍
  • 反馈神经网络与不同类型的神经网络:BP神经网络,深度感知机,CNN,LSTM
  • 轮播图案例
  • Spring 泛型依赖注入
  • C++ Linux调试(无IDE)
  • FFmpeg——视频拼接总结
  • springboot项目怎么样排除自带tomcat容器使用宝蓝德bes web中间件?
  • 响应式ref()和reactive()
  • 运维系列.Nginx中使用HTTP压缩功能