0

My first time here to ask question.

Hope my question could help more friends after solved.

Base:

System Version: CentOS 7.2 64 bit

Problem:

Wrongly remove python that comes with the system. And yum could not be use.

Solution:

1. At this time, the warning message is: screenshot of warning message.

And I focus the question https://stackoverflow.com/questions/18632016/yum-no-module-named-yum at the 1st answer, but it doesn't work.

And I try another way, why not reinstall yum... From then on, cause of this command

rpm -qa | grep yum | xargs rpm -e --nodeps

I was trapped in the "dependencies circle".

2. I followed the 2nd answer in https://stackoverflow.com/questions/18632016/yum-no-module-named-yum. Download all packages dependent from http://mirrors.163.com/centos/7/os/x86_64/Packages/.

Packages list: screenshot of packages installed list.

After I enter this command

rpm -Uvh --replacepkgs *.rpm

All packages installed. And it shows me the problem I didn't find in stackoverflow...

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/python2.7/site-packages/rpm/_rpm.so: undefined symbol: rpmpkgVerifySigs

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.7.5 (default, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

Attempt

Try many times with reinstall yum, rpm and python.. And I know the best way maybe reinstall the system but solving the problem without reinstall is more appealing to friends and me.

Thank you, my friends.

1

1 Answer 1

0

I intented to re-install python and yum in Centos7 and encounterred the same problem. It seems this problem comes from the version of yum rpm packages. probably you used the latest rpm-4.11.3-25.el7.x86_64.rpm, rpm-python-4.11.3-25.el7.x86_64.rpm, yum-3.4.3-154.el7.centos.noarch.rpm. They are too new, you may try to extrat the corresponding packages from the iso file that you installed the system. I am not an expert on Linux, and can not explain the reason for the error. It just worked for me. Hope this would give you some clue.

sincerely zhenhua

2
  • Hi friend. Thank you so much. But, which version of that three modules I should install. Thank you sooo much..
    – Tyler Lin
    Commented Apr 19, 2018 at 14:53
  • Welcome! I used rpm-4.11.3-17.el7.x86_64.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm rpm-python-4.11.3-17.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm yum-3.4.3-132.el7.centos.0.1.noarch.rpm
    – wzh176
    Commented Apr 27, 2018 at 5:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .