Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'
It gets automated patching i.e. yum update -y on a monthly basis. I strongly believe I am not able to use yum/dnf after the automated patching. Is there a way to fix the python
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
Code:
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'
...and....
Quote:
Originally Posted by hasn318
It gets automated patching i.e. yum update -y on a monthly basis. I strongly believe I am not able to use yum/dnf after the automated patching. Is there a way to fix the python
If that's what you believe, then have you contacted your host or Red Hat support for help?? If the automated patching does this, then it's broken something and you should utilize the support you paid for.
Another alternative would be that someone else updated something manually, which broke python. Have they?
It is hosted through AWS and we do not have enterprise support for it. I have quite a few servers with the same exact issue so I highly doubt someone did something to break it.
It is hosted through AWS and we do not have enterprise support for it. I have quite a few servers with the same exact issue so I highly doubt someone did something to break it.
Ah, then my question would go to Amazon AWS. If all your instances are having the same issue, then they may have pushed something out in error.
Not all the instances, 7 out of 30 plus have this issue. The others are running fine. My primary goal right now is to fix the system rather than finding out what broke it. Will do the RCA after the fix.
Not all the instances, 7 out of 30 plus have this issue. The others are running fine. My primary goal right now is to fix the system rather than finding out what broke it. Will do the RCA after the fix.
Providing full details is a good thing.
Have you done any troubleshooting thus far?? Run "python --version" on the machines to see what comes up?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.