Article 6DG7X yum/dnf broken

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'
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments