Ticket Subject(s)
Symptoms
When accessing the "EasyApache 4" interface, you will encounter the following message, which keeps repeating.
The YUM cache is incomplete. The system is updating the cache to repair the issue. This operation can take a few minutes to complete (it is very network and disk i/o intensive). EasyApache 4 will be available as soon as possible …
You will also see an error similar to the following in the cPanel error log.
[13:59:46 host3 root@95674741 ~]cPs# /usr/local/cpanel/bin/packman_get_list_json
Traceback (most recent call last):
File "/usr/local/cpanel/bin/packman.py", line 9, in <module>
import yum
ModuleNotFoundError: No module named 'yum'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/cpanel/bin/packman_get_list_json", line 13, in <module>
import packman
File "/usr/local/cpanel/bin/packman.py", line 12, in <module>
from packman_lib.dnf_impl import *
File "/usr/local/cpanel/bin/packman_lib/dnf_impl.py", line 12, in <module>
import dnf
ModuleNotFoundError: No module named 'dnf'
Description
The issue occurs because the Python interpreter cannot locate the dnf module. This is due to the symbolic link for python3 not being updated to point to the new Python version's binary file.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Use the
alternativescommand to update Python's symbolic link.alternatives --set python3 /usr/bin/python3.6
Please note that "3.6" must be changed to the version number of Python installed on your server.