5/5 - (2 votes)

In this guide, i will show you how you can fix the EasyApache4 yum error after installation of imunify360 or cloudlinux. some time php error.

# ll /etc/yum.repos.d
  • If the system is registered to RHN Classic, only rhel-source.repo should be present under /etc/yum.repos.d/.
    If the system is registered with Red Hat Subscription Manager (RHSM) via subscription-manager, rhel-source.repo and ‘redhat.repo’ are present.
    If any local repositories, or any other media repositories are present, remove them by :-

Raw

# rm -rf /etc/yum.repos.d/<local or other repository name>
  • Remove old yum cache from system by running following commands:

Raw

# rm -fr /var/cache/yum/*
# yum clean all
  • Check if you can list the valid repositories by :-

Raw

# yum repolist

If you are using subscription-manager and the previous solutions do not work, try reenabling each repository one-by-one with the following:-Raw

# REPOLIST=`subscription-manager repos --list-enabled | grep "Repo ID" | awk '{print $3}'`
# subscription-manager repos --disable="*"
# rm -fr /var/cache/yum/*
# yum clean all
# for i in ${REPOLIST}; do subscription-manager repos --enable=$i ; yum repolist; done

Root Cause

  • Possible reasons for this issue:
    1. Corrupted yum cache.
    2. Inaccessibility of a repository URL from the system due to network related issues.
    3. Presence of customized or other media repositories.
    4. Outdated whitelist when using IP-based Firewall configuration to access

About the Author

Shahid Malla

Shahid Malla is an accomplished system admin and web developer, renowned for his expertise in various fields. With a strong background in WHMCS development, WordPress development, and PHP development, Shahid has honed his skills over the years to deliver exceptional results. As a top-rated freelancer, he has consistently garnered praise and recognition, earning a stellar 5-star rating from a pool of 500 reviews. Shahid's proficiency extends beyond coding and development, encompassing server configuration, server management, and web security. With his extensive knowledge and dedication to delivering high-quality solutions, Shahid Malla is your go-to professional for all your technical needs.

View All Articles