Many organizations and individual users, for various reasons, have not yet upgraded their CentOS 8 systems. Some rely on legacy applications that are tightly coupled with the specific version of CentOS 8, while others have postponed upgrades due to concerns over compatibility or resource constraints. As a result, these servers continue to run CentOS 8 despite its end-of-life status. This situation creates the need to address update-related issues to maintain security and functionality. Without proper updates, systems are vulnerable to security threats, software bugs, and dependency issues, making it essential to resolve any errors that arise during the update process. For those who cannot immediately migrate to a newer version, troubleshooting and applying workarounds to keep CentOS 8 running smoothly remains a critical task.
CentOS 8, as a popular enterprise Linux distribution, reached its end-of-life (EOL) status in December 2021. Since then, many users attempting to run yum update
encounter errors like the one described. This article explores the causes of such errors and outlines a step-by-step resolution.
yum update -y
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:02:25 ago on Sun 15 Dec 2024 03:12:58 AM CST.
Error:
Problem 1: package centos-linux-repos-8-3.el8.noarch requires centos-gpg-keys = 1:8-3.el8, but none of the providers can be installed
- cannot install both centos-gpg-keys-1:8-6.el8.noarch and centos-gpg-keys-1:8-3.el8.noarch
- cannot install the best update candidate for package centos-linux-repos-8-3.el8.noarch
- cannot install the best update candidate for package centos-gpg-keys-1:8-3.el8.noarch
Problem 2: problem with installed package centos-linux-repos-8-3.el8.noarch
- package centos-linux-repos-8-3.el8.noarch conflicts with centos-repos(8) provided by centos-stream-repos-8-2.el8.noarch
- package centos-stream-repos-8-2.el8.noarch conflicts with centos-repos(8) provided by centos-linux-repos-8-3.el8.noarch
- package centos-stream-release-8.6-1.el8.noarch requires centos-stream-repos, but none of the providers can be installed
- package centos-linux-repos-8-3.el8.noarch conflicts with centos-repos(8) provided by centos-stream-repos-8-3.el8.noarch
- package centos-stream-repos-8-3.el8.noarch conflicts with centos-repos(8) provided by centos-linux-repos-8-3.el8.noarch
- package centos-stream-repos-8-4.el8.noarch requires centos-gpg-keys = 1:8-4.el8, but none of the providers can be installed
- package centos-linux-repos-8-3.el8.noarch requires centos-gpg-keys = 1:8-3.el8, but none of the providers can be installed
- cannot install both centos-gpg-keys-1:8-4.el8.noarch and centos-gpg-keys-1:8-3.el8.noarch
- package centos-stream-repos-8-6.el8.noarch requires centos-gpg-keys = 1:8-6.el8, but none of the providers can be installed
- cannot install both centos-gpg-keys-1:8-6.el8.noarch and centos-gpg-keys-1:8-3.el8.noarch
- cannot install the best update candidate for package centos-linux-release-8.5-1.2111.el8.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use no t only best candidate packages)
Understanding the Problem
The error message indicates two primary issues:
- Duplicate Repository Listings:
The messageRepository epel is listed more than once in the configuration
signals that multiple repository entries for EPEL (Extra Packages for Enterprise Linux) exist, likely due to improper configurations or duplicate repository files in/etc/yum.repos.d/
. - Dependency Problems:
The linenothing provides (redhat-release >= 8.10 or centos-stream-release >= 8)
implies a mismatch between the installed CentOS 8 version and the required repositories. This happens because the original CentOS 8 repositories have been removed or archived after its EOL. The recommended solution is to migrate to CentOS Stream, which provides rolling-release updates.
Steps to Fix the Issue
1. Identify and Move Old Repository Files
Begin by organizing the repository files to avoid conflicts:
cd /etc/yum.repos.d/
mkdir centos
mv CentOS-Linux-* centos/
This command moves old CentOS Linux repository files into a separate directory for backup purposes.
2. Switch to CentOS Stream
Install CentOS Stream to access the updated repositories:
dnf install centos-release-stream -y --allowerasing
The --allowerasing
option ensures that conflicting packages are replaced seamlessly. CentOS Stream offers a continuous delivery model and supports newer updates.
3. Update Repository URLs
Modify repository files to point to the archived CentOS 8 repositories:
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-*
This changes repository configurations to use the Vault mirror, which hosts archived versions of CentOS repositories.
4. Run Yum Update
Finally, execute the following command to complete the update:
yum update -y
The EOL status of CentOS 8 necessitates adjustments to repository configurations or migration to CentOS Stream. By organizing repository files, migrating to CentOS Stream, and updating repository URLs to Vault mirrors, users can resolve yum update
errors and ensure system stability. This process ensures continued support and access to critical updates.
Leave a Reply