yum/dnf broken
by hasn318 from LinuxQuestions.org on (#6DG7X)
No yum/dnf commands works on RHEL 8 EC2 instance. Whatever yum/dnf command I run, I get the below error. Any help would be appreciated
yum
Traceback (most recent call last):
File "/usr/bin/yum", line 57, in
from dnf.cli import main
File "/usr/lib/python3.6/site-packages/dnf/init.py", line 22, in
import warnings
ImportError: bad magic number in 'warnings': b'a\r\r\n'
yum
Traceback (most recent call last):
File "/usr/bin/yum", line 57, in
from dnf.cli import main
File "/usr/lib/python3.6/site-packages/dnf/init.py", line 22, in
import warnings
ImportError: bad magic number in 'warnings': b'a\r\r\n'