When accessing the MultiPHP Manager in WHM or cPanel, you might encounter a large red error notification that mentions an issue occurring related to yum. Typically you'll see keywords frequently mentioned in the error such as "yum", "yumRepo", "Mirrors", and others.
In some cases, the cause of this issue might be due to a yum repository failing, and you can verify the issue is occurring by running yum commands in your server such as shown below. In the following case the yum commands are queries against packages that have the word python in their name:
yum list python
yum info python
And if the output of your yum command results in error mentioning that a repository has failed, there will normally be accompanying workarounds also mentioned. I'll include those at the end of this article.
To get past this problem, you could simply remove the repository that is causing the issue.
First, you would make a directory to store the repository in. In this case, I'm creating a directory called "cptechs":
mkdir -p /root/cptechs/
Then simply move the repository to that directory. For this example, I'm moving the "imunify360-ea-php-hardened.repo" into the directory named "cptechs" that was just created:
mv -v /etc/yum.repos.d/imunify360-ea-php-hardened.repo /root/cptechs/
Once this is done, test the MultiPHP Manager again.
Note: You may find it necessary to replace packages from the provider that was removed with those of another to avoid future dependency issues. For this task, you can reference the following: How to replace the EasyApache 4 packages from another provider with the packages from the EA4 repository
Alternative workarounds, typically mentioned by your server as a result of running the aforementioned yum queries, will be as shown below. Again, note the repository name happens to specifically be imunify360-ea-php-hardened in this example but you could replace that name with whichever repository is causing an issue on your server:
One of the configured repositories failed (Imunify360 ea-php Hardened repository for CentOS 7 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=imunify360-ea-php-hardened ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable imunify360-ea-php-hardened
subscription-manager repos --disable=imunify360-ea-php-hardened
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
yum-config-manager --save --setopt=imunify360-ea-php-hardened.skip_if_unavailable=true