YUM error: No module named rpm
When I am upgrading my Fedora 10 to Fedora rawhide, my desktop was locked. Then I restart the computer, rerun the yum upgrade. some error like the following comes out.
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named rpm
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.5 (r25:51908, Apr 10 2007, 10:29:13)
[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
someone in fedoraforum said to reinstall yum and python, but i found it didn’t work well.
then i try uninstall some yum plugin such as yum-metadata-parser, then the error mesage becomes
No module named iniparser
it seems that the error comes from here. then i find a package called python-iniparser is out of date. so i download it by hand and update it. try to yum upgrade again, it works! everything comes to there original way.
after all, you just need to reinstall 2 packages: yum-metadata-parser and python-iniparser.