HELP! No module named yum

Issues related to applications and software problems
Post Reply
User avatar
leonardopereira
Posts: 1
Joined: 2018/07/23 20:48:25

HELP! No module named yum

Post by leonardopereira » 2018/07/26 15:18:13

Good afternoon.

After changing the Python version in CentOS 6.9, I can no longer run yum. How do I restore this module without having to reinstall the entire operating system? :shock:

See screenshot attached.
Attachments
error yum screenshot
error yum screenshot
error yum.png (37.24 KiB) Viewed 1505 times

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HELP! No module named yum

Post by TrevorH » 2018/07/26 15:30:52

You cannot update the system python in CentOS or lots of things will break. You now need to undo everything that you did - hopefully you installed into /usr/local rather than /usr and you can just make uninstall or rm the various files/directories, run ldconfig and hash -r. If not then you will have to undo what you did then download all the packages that appear in the output from rpm -Va and manually install them.

If you need newer python versions then look at either EPEL or IUS both of which provide parallel installs of various python versions that can coexist with the system python and not entirely screw your system.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply