项目问题 | CentOS 7停止维护导致yum失效的解决办法

news2024/9/19 14:29:12

目录

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 only
 safe 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 working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).
     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...
     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:
 
            yum-config-manager --disable <repoid>
        or
            subscription-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 much
        slower). 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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2052116.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

云计算实训30——自动化运维(ansible)

自动化运维 ansible----自动化运维工具 特点&#xff1a; 部署简单&#xff0c;使用ssh管理 管理端与被管理端不需要启动服务 配置简单、功能强大&#xff0c;扩展性强 一、ansible环境搭建 准备四台机器 安装步骤 mo服务器&#xff1a; #下载epel [rootmo ~]# yum -y i…

mysql数据库连接时区设置UTC的坑?serverTimezone=UTC是什么意思?

Mysql数据库连接&#xff0c;设置时区为UTC的坑&#xff1a; UTC是世界统一时间&#xff0c;也就是世界协调时间&#xff08;UTC&#xff09;/格林尼治时间。比北京时间快8小时。 导致的问题&#xff1a;数据库连接时区设置为UTC之后&#xff0c;数据库里面的数据和系统里面的时…

计算机毕业设计PyHive+PySpark深圳共享单车预测系统 共享单车数据分析可视化大屏 共享单车爬虫 共享单车数据仓库 机器学习 深度学习 Hadoop

题目&#xff1a; 基于hadoop的共享单车布局规划 1. 论文选题的意义 共享单车是一个近年来很热门的新兴事物&#xff0c; 共享经济在我国发展迅速&#xff0c;收到了政府和广大民众的重大关注&#xff0c;而出现的很多问题也引起了众多学者的注意&#xff0c;关于共享单车的研…

【题解】—— LeetCode一周小结32

&#x1f31f;欢迎来到 我的博客 —— 探索技术的无限可能&#xff01; &#x1f31f;博客的简介&#xff08;文章目录&#xff09; 【题解】—— 每日一道题目栏 上接&#xff1a;【题解】—— LeetCode一周小结31 5.不含连续1的非负整数 题目链接&#xff1a;600. 不含连续…

Idea2024创建Meavn项目

因为现在Idea创建Meavn项目&#xff0c;文件夹下面是光秃秃的&#xff0c;没有默认文件&#xff0c;这里笔者用简单易懂的方式给大家创建一个带文件夹的项目 1. new -> project | 填写基本信息 2. 设置maven坐标 点击Add > Create 创建的文件没有任何结构 src.main.java…

一个集成物联网、机器学习和大数据实践平台在电气工程课程中的应用

整理自《A Platform for Integrating Internet of Things, Machine Learning, and Big Data Practicum in Electrical Engineering Curricula》&#xff0c;由Nandana Jayachandran、Atef Abdrabou、Naod Yamane和Anwer Al-Dulaimi共同撰写&#xff0c;发表于2024年的《Compute…

【python数据分析05】——matplotlib绘图基础语法

matplotlib绘图基础语法 前言1 pyplot基础语法1.1 创建画布与创建子图1.2 添加画布内容1.3 保存与显示图形1.4 设置pyplot的动态rc参数 前言 matplotlib中应用最广的是matplotlib.pyplot模块&#xff0c;这个模块是一个命令风格函数的集合。 1 pyplot基础语法 大部分pyplot图…

Python文件管理器:一个基于wxPython的桌面应用

在当今的软件开发世界中&#xff0c;管理大量的源代码文件变得越来越重要。无论是个人项目还是大型团队协作&#xff0c;有一个强大而灵活的文件管理工具都可以大大提高工作效率。今天&#xff0c;我们要介绍一个基于Python和wxPython构建的文件管理器&#xff0c;它专门用于管…

GNS3 IOU: License section not found in iourc file /tmp/tmpj54abrhf/iourc

现象&#xff1a; License section not found in iourc file /tmp/tmpj54abrhf/iourc 解决方案&#xff1a; IOU 证书&#xff1a;&#xff08;直接复制进去即可&#xff09; [license] gns3-iouvm cd11acbc599f2364; gns3vm 73635fd3b0a13ad0;

记一个坑android Studio:Can‘t bind to local -1 for debugger

AndroidStudio 可编译,安装,设置管理 现象: 唯独 attach 或者调试时报错 Cant bind to local -1 for debugger 控制台日志: 2024-08-15 10:41:59,645 [ 9927] WARN - #com.android.ddmlib - * daemon not running; starting now at tcp:5037 2024-08-15 10:…

DRISSIONPAGE获取图书的封面并保存到本地

一、页面自动截图 二、最终结果 三、代码实现 from DrissionPage import ChromiumPage,ChromiumOptions co =ChromiumOptions().set_paths(browser_path=r"C:\Users\lenovo\AppData\Local\Google\Chrome\Application\chrome.exe") #这里指定浏览器 注意ChromiumOp…

【Oracle篇】统计信息和动态采样的深度剖析(第一篇,总共六篇)

&#x1f4ab;《博主介绍》&#xff1a;✨又是一天没白过&#xff0c;我是奈斯&#xff0c;DBA一名✨ &#x1f4ab;《擅长领域》&#xff1a;✌️擅长Oracle、MySQL、SQLserver、阿里云AnalyticDB for MySQL(分布式数据仓库)、Linux&#xff0c;也在扩展大数据方向的知识面✌️…

广州南沙某工厂电力运维系统案例

一、引言 深圳拓扑未来基于物联网的电力运维系统将云计算、大数据与人工智能对采集的数据进行挖掘整合、共享交换&#xff0c;并以数字全息投影的信息技术手段将数据立体化呈现。满足用户监测众多电力回路运行状态和参数、配电室内环境温湿度、电缆及母线运行温度、现场设备或…

配置静态ip地址,也叫网络地址,linux安装tomcat,mysql,java的jdk,如何把java项目部署到linux上

3、linux 所需软件压缩包 4、防火墙的操作 5、Linux网络配置 接下来需要配置Linux系统的网络&#xff0c;这样才能保证软件能够正常安装上去 5.1 配置连接外网 进入etc/sysconfig/network-scripts目录&#xff0c;使用vi打开 ifcfg-ensXXX文件&#xff0c;进行编辑 cd /etc…

快速体验Ollama安装部署并支持AMD ROCm推理加速

序言 Ollama 是一个专注于本地运行大型语言模型&#xff08;LLM&#xff09;的框架&#xff0c;它使得用户能够在自己的计算机上轻松地部署和使用大型语言模型&#xff0c;而无需依赖昂贵的GPU资源。Ollama 提供了一系列的工具和服务&#xff0c;旨在简化大型语言模型的安装、…

阵列信号处理1_相控阵天线(CSDN_20240818)

与传统天线相比&#xff0c;相控阵天线的阵面是由许多阵元组成的&#xff0c;在这些阵元的基础上&#xff0c;相控阵天线可以利用一些精妙的算法在天线不旋转的条件下&#xff0c;自动形成波束并对准目标。通常&#xff0c;由相控阵天线形成的波束的质量要比普通天线波束的质量…

LeetCode //C - 319. Bulb Switcher

319. Bulb Switcher There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it’s off or turning off if it’s on). For the $i^{th} $roun…

七彩玫瑰与彩虹玫瑰的花语探秘

一、什么是七彩玫瑰和彩虹玫瑰 七彩玫瑰和彩虹玫瑰并非自然界原生的花卉品种&#xff0c;而是通过人工手段精心培育和加工而成的独特花卉。它们的独特之处在于花瓣呈现出七种绚烂的颜色&#xff0c;宛如彩虹般绚丽多彩&#xff0c;令人眼前一亮。 七彩玫瑰和彩虹玫瑰通常是由白…

短链接系统设计方案

背景 需要设计一个短链接系统&#xff0c;主要功能主要有如下几点&#xff1a; ToB&#xff1a; 输入一个长链接&#xff0c;转换成短链接。这个短链接有时效性&#xff0c;可以设定指定过期时间。这个系统的每天会生成千万级别的短链接。数据具备可分析功能。 ToC&#xf…

xss.function靶场(hard)

文章目录 WW3源码分析源码 DOMPpurify框架绕过覆盖变量notifyjs作用域和作用链域构建payload WW3 源码 <!-- Challenge --> <div><h4>Meme Code</h4><textarea class"form-control" id"meme-code" rows"4"><…