Linux - Distributions This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-02-2023, 11:54 AM
|
#1
|
LQ Newbie
Registered: Aug 2023
Posts: 4
Rep:
|
yum/dnf broken
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'
|
|
|
08-02-2023, 11:56 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,707
|
did you make any changes on that system? Probably you need to reinstall python and some packages.
|
|
|
08-02-2023, 12:16 PM
|
#3
|
LQ Newbie
Registered: Aug 2023
Posts: 4
Original Poster
Rep:
|
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
|
|
|
08-02-2023, 12:23 PM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,491
|
Quote:
Originally Posted by hasn318
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?
|
|
|
08-02-2023, 12:40 PM
|
#5
|
LQ Newbie
Registered: Aug 2023
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
08-02-2023, 12:58 PM
|
#6
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,491
|
Quote:
Originally Posted by hasn318
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.
|
|
|
08-02-2023, 01:06 PM
|
#7
|
LQ Newbie
Registered: Aug 2023
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
08-02-2023, 01:16 PM
|
#8
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,491
|
Quote:
Originally Posted by hasn318
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?
|
|
|
All times are GMT -5. The time now is 02:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|