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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content