Yum fails with error pycurl.error: initializing curl failed

Solution Verified - Updated -

Issue

  • yum fails with error pycurl.error: initializing curl failed as per traceback:
[root@test ~] # yum repolist
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 59, in <module>
    import config
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1951, in <module>
    _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
pycurl.error: initializing curl failed

[root@test ~] # subscription-manager status
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 9, in <module>
    load_entry_point('subscription-manager==1.24.42', 'console_scripts', 'subscription-manager')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 63, in <module>
    from subscription_manager.injectioninit import init_dep_injection
  File "/usr/lib64/python2.7/site-packages/subscription_manager/injectioninit.py", line 20, in <module>
    from subscription_manager.cache import ProductStatusCache, \
  File "/usr/lib64/python2.7/site-packages/subscription_manager/cache.py", line 31, in <module>
    from rhsm.profile import get_profile
  File "/usr/lib64/python2.7/site-packages/rhsm/profile.py", line 35, in <module>
    import yum
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 59, in <module>
    import config
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1951, in <module>
    _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
pycurl.error: initializing curl failed

Environment

  • Red Hat Enterprise Linux 7

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