项目问题 | CentOS 7停止维护导致yum失效的解决办法
目录
centos停止维护意味着yum相关源伴随失效。
报错:
解决方案:将图中四个文件替换掉/etc/yum.repos.d/目录下同名文件
资源提交在博客头部,博客结尾也提供文件源码内容
CentOS-Base.repo
CentOS-SCLo-scl.repo
CentOS-SCLo-scl-rh.repo
epel.repo
2020 年,CentOS 项目与红帽联合宣布将全部投资转向 CentOS Stream,这是未来红帽企业 Linux 发行版的上游开发平台。因此,该项目在 2021 至 2024 年期间停止对 CentOS Linux 的更新和发布,直到 2024 年 6 月 30 日 CentOS Linux 7 的生命周期终止。
centos停止维护意味着yum相关源伴随失效。
报错:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"One of the configured repositories failed (未知),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nice
▽ compromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
解决方案:将图中四个文件替换掉/etc/yum.repos.d/目录下同名文件,包中文件重新配置了一些yum源获取的地址,替换后大部分都可以正常使用,但是难免可能会缺失其他包,建议尽快切换其它linux系统。
)
资源提交在博客头部,博客结尾也提供文件源码内容。

参考:CentOS停止维护(EOL)后的应对方案_云服务器 ECS(ECS)-阿里云帮助中心 (aliyun.com)
CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
CentOS-SCLo-scl.repo
# CentOS-SCLo-sclo.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more
# information[centos-sclo-sclo]
name=CentOS-7 - SCLo sclo
baseurl=http://vault.centos.org/centos/7/sclo/$basearch/sclo/
#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-sclo
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-sclo-testing]
name=CentOS-7 - SCLo sclo Testing
baseurl=http://buildlogs.centos.org/centos/7/sclo/$basearch/sclo/
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-sclo-source]
name=CentOS-7 - SCLo sclo Sources
baseurl=http://vault.centos.org/centos/7/sclo/Source/sclo/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-sclo-debuginfo]
name=CentOS-7 - SCLo sclo Debuginfo
baseurl=http://debuginfo.centos.org/centos/7/sclo/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
CentOS-SCLo-scl-rh.repo
# CentOS-SCLo-rh.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more
# information[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=http://vault.centos.org/centos/7/sclo/$basearch/rh/
#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-rh-testing]
name=CentOS-7 - SCLo rh Testing
baseurl=http://buildlogs.centos.org/centos/7/sclo/$basearch/rh/
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-rh-source]
name=CentOS-7 - SCLo rh Sources
baseurl=http://vault.centos.org/centos/7/sclo/Source/rh/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo[centos-sclo-rh-debuginfo]
name=CentOS-7 - SCLo rh Debuginfo
baseurl=http://debuginfo.centos.org/centos/7/sclo/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
baseurl=http://download.example/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
baseurl=http://download.example/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place it's address here.
baseurl=http://download.example/pub/epel/7/source/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
相关文章:
项目问题 | CentOS 7停止维护导致yum失效的解决办法
目录 centos停止维护意味着yum相关源伴随失效。 报错: 解决方案:将图中四个文件替换掉/etc/yum.repos.d/目录下同名文件 资源提交在博客头部,博客结尾也提供文件源码内容 CentOS-Base.repo CentOS-SCLo-scl.repo CentOS-SCLo-scl-rh.rep…...
【Docker】Docker Compose(容器编排)
一、什么是 Docker Compose docker-compose 是 Docker 官方的开源项目,使用 python 编写,实现上调用了 Docker 服务的 API 进行容器管理及编排,其官方定义为定义和运行多个 Docker 容器的应用。 docker-compose 中有两个非常重要的概念&…...
嵌入式初学-C语言-二九
C语言编译步骤 预处理编译汇编链接 什么是预处理 预处理就是在源文件(如.c文件)编译之前,所进行的一部分预备操作,这部分操作是由预处理程序自动完成,当源文件在编译时,编译器会自动调用预处理指令的解析…...
0x03 ShowDoc 文件上传漏洞(CNVD-2020-26585)复现
参考:ShowDoc文件上传漏洞(CNVD-2020-26585)_showdoc漏洞-CSDN博客 一、fofa 搜索使用该工具的网站 网络空间测绘,网络空间安全搜索引擎,网络空间搜索引擎,安全态势感知 - FOFA网络空间测绘系统 "S…...
【大模型从入门到精通34】开源库框架LangChain 利用LangChain构建聊天机器人1
这里写目录标题 利用LangChain构建聊天机器人介绍介绍对话型聊天机器人构建环境环境变量和平台设置 加载文档和创建向量存储高级检索技术对话上下文和记忆纳入聊天历史会话缓冲内存 构建对话检索链环境设置与API密钥配置选择合适的语言模型版本Q&A系统设置 利用LangChain构…...
魔法糖果工厂
LYA 是一家魔法糖果工厂的新任管理员。工厂生产的魔法糖果有七种颜色,分别用字母 a、b、c、d、e、f、g 表示。这些糖果被排列在一条传送带上,准备进行包装。为了提高效率,工厂引进了一台智能包装机器人。这个机器人可以按照预设的指令序列来包…...
NVM安装管理node.js版本(简单易懂)
一、前言 1.1 简介 NVM(Node Version Manager)是 node.js 的版本管理器,用 shell 脚本切换机器中不同版本的 nodejs。 Nodejs为什么需要多个版本? 有经验的开发者可能遇到过,某个依赖包明确nodejs是某个版本&#…...
第1章-04-Chrome及Chrome Driver安装及测试
🏆作者简介,黑夜开发者,CSDN领军人物,全栈领域优质创作者✌,CSDN博客专家,阿里云社区专家博主,2023年CSDN全站百大博主。 🏆数年电商行业从业经验,历任核心研发工程师&am…...
【Linux】SSH 隧道转发场景搭建
ssh建立隧道转发 A设备:没有公网IP地址的本地设备,如本地内网服务器(需要能通公网) B设备:有公网IP地址的服务器,可以是云服务器 C设备:终端设备,想通过公网服务器B访问到设备A 要…...
前后端部署-服务器linux中安装数据库Mysql8
一、登录Xshell7 && 开放Mysql 3306端口, Redis 6379 端口 二、手动部署MySQL数据库 1.运行以下命令,更新YUM源。 sudo rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm 2.运行以下命令,安装My…...
如何使用jd-gui对springboot源码进行分析
背景: 最近在学习springboot的过滤器和拦截器,想了解一下过滤器和拦截器是怎么匹配URL的,在网上搜了半天都搜不到针对源码的,网上大部分内容都是说怎么配置过滤器和拦截器,怎么使用,并没有对源码进行分析的…...
原来ChatGPT是这么评价《黑神话:悟空》的啊?
《黑神话:悟空》一经上线便迅速吸引了全球的目光,成为了今日微博热搜榜上的焦点话题。作为中国首款现象级的中国3A大作,它的发布无疑引发了广泛的关注与讨论。 《黑神话:悟空》,这款3A国产游戏大作,由国内游…...
C语言第17篇
1.在C语言中,全局变量的存储类别是_________. A) static B) extern C) void D) register 提示:extern adj.外来的 register n.登记表,v.登记 提示与本题无关 2.在一个C源程序文件中,要定义一个只允许本源文件中所有函数使用的全局变…...
Springboot+vue实现webScoket
需求 因为在做的项目中,有多个网站登录同一个用户,故想在某一个页面登录或者退出的时候,对其他页面进行相同的操作 跨域,跨页面,跨项目,跨标签页,https 因为一开始不像麻烦后端,所以…...
CSS知识点详解:display+float
display:浮动 1.block:使元素呈现为块级元素,可设置宽高 display: block; 特点:使元素呈现为块级元素,即该元素会以新行开始,占据整行的宽度,即使其宽度未满。 例子: 2.inline&a…...
ant design pro v6 如何做好角色管理
先上图: 整个角色管理是如何做的吗? 首先你要处理后端,要先把角色存到用户那。 这是用户管理部分的内容: 可以看到一个用户是有多个角色的。 看到没有,存的是数组 数组的是一个 role 对象 role 对象是这样…...
C++ 设计模式(3. 抽象工厂模式)
抽象工厂模式也是一种创建型设计模式,提供了一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类【引用自大话设计模式第15章】基本结构 抽象工厂模式包含多个抽象产品接口,多个具体产品类,一个抽象工厂接口和多个具体…...
【PHP入门教程】PHPStudy环境搭建+HelloWorld运行
文章目录 PHP 的历史PHP 的用途PHP 的特点和优势PHP 环境搭建环境准备安装window 安装CentOS / Ubuntu / Debian 安装 第一个Hello World使用Apache服务运行命令行运行代码 PHP 的历史 PHP(Hypertext Preprocessor)超文本预处理器是一种开源的通用脚本语…...
补 0 输出。
题目描述 输入一个整数,请在整数前面补 00 补足 88 位后输出。 输入描述 输入一行包含一个整数 nn。 输出描述 输出补00后的整数。 输入输出样例 示例1 输入 2021输出 00002021示例2 输入 202110输出 00202110 import os import sys# 请在此输入您的代码 si…...
因为嫌吵,在自己家也用上了远程控制电脑
加班嘛,赶稿嘛,参加工作的人都懂那种无形的压力和烦躁。 因为家里空间有限,我平常都是直接在客厅用台式电脑加急改写方案,但今天晚上家里来了几位叔,他们边吃饭边聊着秦始皇的话题,都70多分钟了,…...
FPGA调试避坑指南:Vivado ILA采样深度和探针位宽怎么设?资源占用与调试效果的平衡术
FPGA调试实战:ILA采样深度与探针位宽的黄金平衡法则 当你在Artix-7芯片上调试一个包含32位计数器和多状态机的设计时,突然发现ILA吃掉了一半的Block RAM资源,而采样深度却只够捕获5个时钟周期的数据——这种场景是否似曾相识?本文…...
LFM2.5-1.2B-Thinking-GGUF惊艳效果:复杂逻辑推理题(如数理推导)分步求解
LFM2.5-1.2B-Thinking-GGUF惊艳效果:复杂逻辑推理题(如数理推导)分步求解 1. 模型能力概览 LFM2.5-1.2B-Thinking-GGUF是Liquid AI推出的轻量级文本生成模型,专为低资源环境优化设计。这个1.2B参数的模型采用GGUF格式࿰…...
英飞凌AURIX TC3XX GPIO驱动配置与LED呼吸灯实现
1. 认识AURIX TC3XX的GPIO模块 第一次接触英飞凌AURIX TC3XX系列MCU时,我被它强大的GPIO功能惊艳到了。这不仅仅是一个简单的数字输入输出接口,而是集成了多种高级特性的硬件模块。在实际汽车电子项目中,比如氛围灯控制、状态指示灯等场景&a…...
Remotery WebSocket通信机制:浏览器端性能数据可视化
Remotery WebSocket通信机制:浏览器端性能数据可视化 【免费下载链接】Remotery Single C file, Realtime CPU/GPU Profiler with Remote Web Viewer 项目地址: https://gitcode.com/gh_mirrors/re/Remotery Remotery作为一款轻量级实时CPU/GPU性能分析工具&…...
D-Net:动态大内核与特征融合如何革新三维医学影像分割?
1. 为什么医学影像分割需要动态大内核? 医学影像分割就像给CT或MRI照片上的器官、肿瘤画精确边界线。传统方法像用固定倍数的放大镜观察——要么看不清细节(小内核),要么错过整体结构(大内核)。我在处理腹…...
Realtek RTL8125 2.5GbE网卡驱动技术指南
Realtek RTL8125 2.5GbE网卡驱动技术指南 【免费下载链接】realtek-r8125-dkms A DKMS package for easy use of Realtek r8125 driver, which supports 2.5 GbE. 项目地址: https://gitcode.com/gh_mirrors/re/realtek-r8125-dkms 1. 问题诊断:网络设备识别…...
OpenClaw语音控制扩展:Qwen3.5-4B-Claude对接Whisper实现声控自动化
OpenClaw语音控制扩展:Qwen3.5-4B-Claude对接Whisper实现声控自动化 1. 为什么需要语音控制自动化 去年冬天的一个深夜,我在赶制项目文档时突发奇想:如果能让AI听懂我的语音指令直接操作电脑,是不是连键盘都不用碰了?…...
网络安全学习攻略宝典,从菜鸟到高手的必由之路
想成为一名真正的黑客到底该怎么学? 从0开始又该从何学起呢? 很多人想学习网络安全,却不知道从何下手。别迷茫,这篇文章为你指明方向,无论你是零基础小白,还是有一定基础想提升的人,都能从中找…...
Anaconda+AKShare保姆级教程:5分钟搞定Python量化环境(附常见报错解决方案)
AnacondaAKShare极速配置指南:零基础搭建Python量化环境全攻略 刚接触量化投资的新手们,往往在第一步——环境搭建上就卡壳了。明明跟着教程一步步操作,却总是遇到各种报错提示,让人望而生畏。本文将手把手带你用Anaconda和AKSha…...
水下机器人导航的‘感官进化’:从纯视觉VIO到声光惯压融合的SVIn2系统拆解
水下机器人导航的‘感官进化’:从纯视觉VIO到声光惯压融合的SVIn2系统拆解 当一台水下机器人潜入浑浊的湖泊执行管道巡检任务时,它的视觉传感器突然失效——悬浮颗粒使画面变成乳白色噪点,而水流扰动让惯性测量单元(IMU)数据充满噪声。这正是…...
