Yum update shows "'module' object has no attribute 'HTTPSHandler'" error


When you try and run a yum update you receive the following error :

root@localhost:/$ yum update
Traceback (most recent call last):
File "/usr/bin/yum", line 4, in ?
import yum
File "/usr/lib/python2.4/site-packages/yum/", line 42, in ?
import config
File "/usr/lib/python2.4/site-packages/yum/", line 27, in ?
from parser import ConfigPreProcessor
File "/usr/lib/python2.4/site-packages/yum/", line 3, in ?
import urlgrabber
File "/usr/lib/python2.4/site-packages/urlgrabber/", line 53, in ?
from grabber import urlgrab, urlopen, urlread
File "/usr/lib/python2.4/site-packages/urlgrabber/", line 406, in ?
import keepalive
File "/usr/lib/python2.4/site-packages/urlgrabber/", line 339, in ?
class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler' 


First of all run the command "rpm -Va python\* yum\*". This will show you all the installed rpms which currently have problems. These dependencies may though also cause other programs/binaries issues as well.

root@localhost:/$ rpm -Va python\* yum\*
Unsatisfied dependencies for python-iniparse-0.2.3-4.el5.noarch: python(abi) = 2.4
Unsatisfied dependencies for python-sqlite-1.1.7-1.2.1.i386: python(abi) = 2.4
Unsatisfied dependencies for python-urlgrabber-3.1.0-2.noarch: /usr/bin/python, python(abi) = 2.4
Unsatisfied dependencies for python-elementtree-1.2.6-5.i386: python(abi) = 2.4, python-abi = 2.4
Unsatisfied dependencies for yum-metadata-parser-1.1.2-2.el5.i386:,, python(abi) = 2.4

Using the above as an example we would run the following commands to resolve the problem dependencies :

root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/openssl-0.9.8e-12.el5.i386.rpm
root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/python-2.4.3-24.el5_3.6.i386.rpm
root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/libxml2-2.6.26-
root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/glib2-2.12.3-4.el5_3.1.i386.rpm
root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/bzip2-1.0.3-4.el5_2.i386.rpm
root@localhost:/$ rpm -Uvh --force --nodeps /var/cache/yum/*/packages/bzip2-libs-1.0.3-4.el5_2.i386.rpm 

Now you should see no issues from the  "rpm -Va python\* yum\*" command and be able to run the "yum update" command.

Additional Notes

If you still receive issues from the output of  "rpm -Va python\* yum\*" (Unsatisfied dependencies), you can always try to update the whole of the yum cache via the command "rpm -Uvh --force --nodeps /var/cache/yum/*/packages/*.rpm".

As a last resort you can try to uninstall the the the rpm then reinstall via the commands "rpm -ev --nodeps [rpm name].rpm" and then reinstall via the command "rpm -iv --nodeps [rpm name].rpm".

Tags: Yum

About the Author


R Donato

Rick Donato is the Founder and Chief Editor of He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001