subscription-manager, rhn_register, sosreport commands fail due to 'Error: No module named ...'

Solution Verified - Updated -

Issue

Subscription-manager commands return:

[root@system ~]# subscription-manager register
Unable to find Subscription Manager module.
Error: No module named M2Crypto
[root@system]# rhn_register
Traceback (most recent call last):
...
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 14, in 
    import OpenSSL
ImportError: No module named OpenSSL

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, 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