sosreport traceback on RHEL6, ending in "ImportError: No module named rpm"

Solution Unverified - Updated -

Issue

  • 'sosreport' bombs out with the below error:
        # sosreport
        Traceback (most recent call last):
          File "/usr/sbin/sosreport", line 18, in <module>
            from sos.sosreport import sosreport, doExitCode
          File "/usr/lib/python2.6/site-packages/sos/sosreport.py", line 40, in <module>
            import sos.policyredhat
          File "/usr/lib/python2.6/site-packages/sos/policyredhat.py", line 31, in <module>
            import rpm
        ImportError: No module named rpm

Environment

  • Red Hat Enterprise Linux (RHEL) 6

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.