This article addresses the common issue of the "yum" command (such as yum update, or yum install) not functioning properly on CentOS 7 servers after the operating system's End of Life (EOL) date. It explains the cause of the problem and provides recommended solutions for affected users.
Cause:
CentOS 7 reached its End of Life (EOL) on June 30, 2024. As a result, the CentOS 7 repository is no longer maintained by the operating system vendor, leading to unexpected behavior with certain functionalities, including the yum package manager. It will display errors similar to the below output when attempting to use "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; Name or service not known"
One of the configured repositories failed (Unknown),
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:
[...]
Cannot find a valid baseurl for repo: base/7/x86_64
Additional Information:
- The issue is not specific to RackNerd but affects all CentOS 7 installations globally.
- Continuing to use an unsupported operating system can pose security risks and compatibility issues.
- AlmaLinux 8 is recommended as a suitable replacement for CentOS 7, as it is binary compatible with RHEL and offers a familiar environment for CentOS users.
Recommended Solution:
1. Back up all important data from your CentOS 7 VPS.
2. Reinstall your VPS with a supported operating system, such as AlmaLinux 8.
3. To learn how to reinstall your VPS, please refer to our video tutorial: https://www.youtube.com/watch?v=Jy8Q3s3uXlk