yum, rpm commands fail with "/lib64/libelf.so.1: file too short"

Solution Verified - Updated -

Issue

  • Commands such as yum and rpm fail with the below errors:
[root@host /]# yum clean all
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /lib64/libelf.so.1: file too short

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, Apr  9 2015, 11:03:32)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

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

[root@host /]# rpm -qf /lib64/libelf.so.1
rpm: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

Environment

  • Red Hat Enterprise Linux 6.x
  • Red Hat Enterprise Linux 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.