Why do rpm and yum commands not working due to an "error while loading shared libraries libbz2.so.1" ?
Issue
yum
andrpm
commands are not working. The errors displayed are as follows.
# rpm -qf
rpm: error while loading shared libraries: libbz2.so.1: cannot open shared object file: No such file or directory
# yum list
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libbz2.so.1: cannot open shared object file: No such file or directory
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.6.6 (r266:84292, Nov 21 2013, 10:50:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
sosreport
can't be generated too.
Environment
- Red Hat Enterprise Linux 6.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.