Knowledgebase

CentOS 6 ELS - the "No more mirrors to try" error during yum update

If you're encountering the "No more mirrors to try" error  yum update on CentOS 6 ELS (Extended Lifecycle Support), it means that yum are unable to find any valid mirrors to download updates from. This can happen if the CentOS 6 ELS repositories are no longer available or if there are issues with the repository configuration.

Here's how you can address this issue:

  1. Check Repository Availability:

    • Verify if the CentOS 6 ELS repositories are still accessible. It's possible that the repositories have been discontinued, which would prevent yum us from finding any valid mirrors.
  2. Update Repository URLs:

    • Open the CentOS repository configuration files in /etc/yum.repos.d/ directory and ensure that the repository URLs are correct and up-to-date. You may need to replace them with alternative mirrors or repositories.
  3. Disable Repositories:

    • Temporarily disable the repositories that are causing issues by setting enabled=0 in their respective configuration files. This can prevent yum them from attempting to use them.
  4. Update yum Cache:

    • Clear the yum cache to ensure it fetches the latest repository information:
    bash

 

  • sudo yum clean all
  • Update CentOS Base Repository:

    • Make sure that the CentOS Base repository is enabled and configured correctly. It's a critical repository for receiving updates.
  • Update Repository GPG Keys:

    • Verify if the GPG keys for the repositories are valid. If not, you may need to import or update them.
    bash

 

  1. sudo rpm --import https://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  2. Use Alternative Repositories:

    • Consider using alternative repositories or mirrors that are known to be reliable and up-to-date.
  3. Check Network Connectivity:

    • Ensure that your server has a working internet connection and that there are no network issues preventing yum from reaching the repositories.
  4. Verify ELS Subscription:

    • Ensure that your CentOS 6 system has a valid ELS subscription. Without a valid subscription, you may not have access to ELS repositories.
  5. Contact CentOS Support:

    • If the issue persists, consider reaching out to CentOS support or the ELS support team for further assistance.

Please be aware that CentOS 6 ELS reached its end-of-life in November 2020, and it's recommended to migrate to a supported CentOS version or a CentOS alternative like CentOS Stream or AlmaLinux. If possible, consider upgrading to CentOS 7 or CentOS 8, or migrating to a different distribution like AlmaLinux that provides long-term support.

 
  • 0 Users Found This Useful
Was this answer helpful?