在 yum 更新期间,我们的一台服务器突然断电,现在尝试运行 yum 会产生以下问题:
# 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
我可以看到“ts”位于 site-packages/rpm/transaction.py 中,并且它位于 python-2.7 下(与当前 python 版本匹配)。有没有人见过这个问题并找到了可行的解决方案?
---更新 1---
通过 rsyncing 另一个工作系统的站点包目录解决了这个直接错误,但现在出现了不同的错误:
/usr/lib64/python2.7/site-packages/rpm/_rpm.so: undefined symbol: rpmtsAddReinstallElement
事实证明,这一点更难确定。
谢谢!