We had a power hit to one of our servers during a yum update, and now trying to run yum produces the following:
# yum update
error: Failed to initialize NSS library
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
cannot import name ts
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, 08: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
I can see that "ts" is in site-packages/rpm/transaction.py and that it's under python-2.7 (which matches the current python version). Has anyone seen this problem and found a workable fix?
---Update 1---
Got past this immediate error by rsyncing another, working system's site-packages directory, but am now getting a different error:
/usr/lib64/python2.7/site-packages/rpm/_rpm.so: undefined symbol: rpmtsAddReinstallElement
This one's proving harder to pin down.
Thanks!