INFORMATICS

The Best

Error: Problem: cannot install the best update candidate for package remi-release-8.3-1.el8.remi.noarch

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Error Translation:

Error: Problem: cannot install the best update candidate for package remi-release-8.3-1.el8.remi.noarch - nothing provides redhat-release >= 8.10 needed by remi-release-8.10-2.el8.remi.noarch (adding "--skip-broken" will skip uninstallable packages, or "--nobest" will use not only the best candidates)


Explanation and Solution Translation:

The error you encountered during yum update indicates an issue with the REMI repository, which is attempting to update the remi-release package to version 8.10-2.el8.remi.noarch. This version requires the dependency redhat-release >= 8.10, which is not available on your CentOS 8 system. This is a common issue when an external repository (e.g., REMI) expects a newer system version that is not available in CentOS 8, especially after its End of Life (EOL) in December 2021.

Below are the steps to resolve this issue:

Causes of the Error

  1. CentOS 8 EOL: CentOS 8 no longer receives updates, and its repositories have been moved to vault.centos.org. Newer package versions from the REMI repository may require dependencies unavailable in CentOS 8's archived repositories.
  2. Version Mismatch of remi-release: The package remi-release-8.10-2.el8.remi.noarch is designed for a newer system version (e.g., CentOS Stream 8 or RHEL 8.10), which your system does not meet.
  3. Conflicting Repositories: If you have additional repositories enabled, they may cause conflicts.

Solutions

Option 1: Use --nobest or --skip-broken

As suggested by the error message, you can use the --nobest or --skip-broken options to bypass problematic packages:

  • Try with --nobest:
    bash
     
    sudo yum update --nobest -y
     
     
    The --nobest option allows installing non-latest package versions, which may bypass dependency issues.
  • Try with --skip-broken:
    bash
     
    sudo yum update --skip-broken -y
     
     
    The --skip-broken option skips packages that cannot be installed due to missing dependencies.

Note: These options are temporary workarounds, as they may leave your system with outdated or skipped packages.

Option 2: Disable the REMI Repository

If you don’t need packages from the REMI repository, you can temporarily disable it during updates:

  • Disable the REMI repository:
    bash
     
    sudo yum update --disablerepo=remi -y
     
     
    This allows updating the system without considering the REMI repository.
  • Check enabled repositories:
    bash
     
    yum repolist
     
     
    Ensure CentOS repositories (e.g., baseos, appstream) point to vault.centos.org.

Option 3: Manually Install an Older Version of remi-release

If you need the REMI repository, you can install an older, CentOS 8-compatible version of the remi-release package:

  • Remove the problematic version:
    bash
     
    sudo yum remove remi-release
     
     
  • Download and install an older version of remi-release: For example, remi-release-8.3-1.el8.remi.noarch.rpm:
    bash
     
    sudo rpm -Uvh remi-release-8.3-1.el8.remi.noarch.rpm
     
     
  • Clear the YUM cache:
    bash
     
    sudo yum clean all
    sudo rm -rf /var/cache/yum/*
     
     
  • Try updating again:
    bash
     
    sudo yum update -y
     
     

Option 4: Migrate to CentOS Stream 8

Since CentOS 8 is no longer supported, the REMI repository may require a newer system version, such as CentOS Stream 8, which still receives updates. Consider migrating:

  • Migrate to CentOS Stream:
    bash
     
    sudo dnf install centos-release-stream
    sudo dnf swap centos-linux-repos centos-stream-repos
    sudo dnf distro-sync -y
     
     

Note: Migrating to CentOS Stream converts the system to a rolling release model, which may affect stability in production environments.

  • Update the system after migration:
    bash
     
    sudo dnf update -y
     
     

Option 5: Manually Edit Repository Files

If the issue stems from conflicts in the REMI repository configuration, you can manually adjust it:

  • Open the REMI repository file:
    bash
     
    sudo nano /etc/yum.repos.d/remi.repo
     
     
  • Ensure the repository points to the correct version: Verify that the baseurl in the [remi] or [remi-safe] section points to the appropriate CentOS 8 version, e.g.:
    ini
     
    [remi]
    name=Remi's RPM repository for Enterprise Linux 8
    enabled=1
    gpgcheck=1
     
     
  • Save changes and clear the cache:
    bash
     
    sudo yum clean all
    sudo yum update -y
     
     

Additional Notes

  • Backup: Before making changes, back up your system or at least the /etc/yum.repos.d/ directory:
    bash
     
    sudo cp -r /etc/yum.repos.d /etc/yum.repos.d.bak
     
     
  • Check DNS: Ensure your server can resolve domain names (e.g., rpms.remirepo.net):
    bash
     
    ping rpms.remirepo.net
     
     
    If it fails, add DNS servers to /etc/resolv.conf:
    ini
     
    nameserver 8.8.8.8
    nameserver 8.8.4.4
     
     
  • Alternative to CentOS 8: Due to CentOS 8’s EOL, consider switching to Rocky Linux or AlmaLinux, which are fully compatible with RHEL 8 and community-supported.

Verification

After applying one of the solutions, verify if the update works:

bash
 
sudo yum repolist
sudo yum update -y
 
 

If the error persists, provide the contents of /etc/yum.repos.d/remi.repo or the exact error message, and I’ll help analyze it further.

Search