How to switch to a different repository for CentOS 8 EOL

 CentOS 8 reached its end of life at the end of 2021. When using yum repositories for installation, you may encounter the following error:

 

 

 

Solution:

1、Navigate to the "repos" directory of yum.

       cd /etc/yum.repos.d/ 

 

2、Modify the contents of all CentOS files.

       sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* 

      sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* 

 

3、Update the yum source to Alibaba Mirror.

       yum clean all && yum makecache 

      yum -y install wget 

       wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo 

      yum -y install epel-release 

        

 

After switching to the Alibaba Mirror, test if you can successfully use yum to download the desired tools. 

 

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

CentOS 7.x Firewall: Enable/Disable and Add Ports

  In CentOS 7.x, the default firewall is firewalld. Here is an example using CentOS 7.6...

How to enable/disable ping on Linux system

To prevent others from discovering and potentially attacking your machine through network ping...

How to View Memory Usage and Clear Cache in Linux System

Sometimes, when a server becomes unresponsive, it may not necessarily be due to high CPU usage....

How to remotely access a Linux system using Putty tool

Introduction to Putty software PuTTY is a Telnet, SSH, rlogin, raw TCP, and serial interface...

Linux System RuiSu Installation Tutorial

Note: The prerequisite for installing RuiSu is to ensure that the network card is in the "eth"...