赞
踩
Since the mirrorlist.centos.org
domain cannot be resolved even with Google’s DNS, it suggests that the domain might be down or deprecated. In such cases, configuring YUM to use direct URLs to the CentOS vault repositories is the best approach.
Here are the steps to set up your YUM configuration to use the CentOS vault repositories directly:
Create or Edit the Repository File:
Open or create the repository configuration file /etc/yum.repos.d/CentOS-Vault.repo
:
sudo nano /etc/yum.repos.d/CentOS-Vault.repo
Add the Following Configuration:
[base] name=CentOS-7 - Base baseurl=http://vault.centos.org/7.9.2009/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [updates] name=CentOS-7 - Updates baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [extras] name=CentOS-7 - Extras baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Save and Exit the Editor:
Save the changes and exit the editor (in nano, you can do this by pressing Ctrl+O
, then Enter
, and Ctrl+X
).
Clean YUM Metadata:
Clean the YUM metadata to ensure it uses the new repository configuration:
sudo yum clean all
Install EPEL Release:
Try installing the EPEL release package again:
sudo yum install epel-release
By configuring YUM to use the vault repositories, you should be able to bypass the issue with the unreachable mirror list and continue installing and updating packages on your CentOS 7 system.
Successfully resolved the issue with CentOS 7 YUM package repositories by backing up and clearing the configuration files in /etc/yum.repos.d/
, cleaning the YUM cache, and configuring YUM to use the CentOS vault repositories. This solution was necessary because official support for CentOS 7 YUM packages ended on July 1st, 2024.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。