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 :-
# rm -rf /etc/yum.repos.d/<local or other repository name>
- Remove old yum cache from system by running following commands:
# rm -fr /var/cache/yum/*
# yum clean all
- Check if you can list the valid repositories by :-
# 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:
- Corrupted yum cache.
- Inaccessibility of a repository URL from the system due to network related issues.
- Presence of customized or other media repositories.
- Outdated whitelist when using IP-based Firewall configuration to access
Show Comments