This case applies to most Red Hat Enterprise Linux 4, from i386 to i686 machines, i’ve successfully used it on our Red Hat Enterprise Linux ES release 4 (Nahant Update 6):
To use it for other systems / architectures, check the packages given at (check).

1. Get the main packages

(check) http://dag.wieers.com/rpm/packages/yum/

$wget http://dag.wieers.com/rpm/packages/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm

(check) http://rpmfind.net/linux/rpm2html/
search.php?query=libsqlite.so.0&submit=Search+…&system=&arch=

$wget ftp://fr2.rpmfind.net/linux/PLD/dists/ac/ready/i386/libsqlite-2.8.15-1.i386.rpm

(check) http://rpmfind.net/linux/rpm2html/
search.php?query=python-elementtree&submit=Search+…&system=&arch=

$wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-elementtree-1.2.6-7.el4.rf.i386.rpm

(check) http://rpmfind.net/linux/rpm2html/
search.php?query=python-sqlite&submit=Search+…&system=&arch=

$wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-sqlite-0.5.0-1.2.el4.rf.i386.rpm

(check) http://rpmfind.net/linux/rpm2html/
search.php?query=urlgrabber&submit=Search+…&system=&arch=

$wget ftp://rpmfind.net/linux/dag/redhat/el4/en/x86_64/dag/RPMS/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm

2. Install Rpm’s

$rpm -ivh libsqlite-2.8.15-1.i386.rpm
$rpm -ivh python-elementtree-1.2.6-7.el4.rf.i386.rpm
$rpm -ivh python-sqlite-0.5.0-1.2.el4.rf.i386.rpm
$rpm -ivh python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
$rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm

3. Setup the Repository
(check) http://dag.wieers.com/rpm/packages/rpmforge-release/

$wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
$rpm -ivh rpmforge-release-0.3.6-1.el4.rf.i386.rpm

4. Yum update all packages

$yum update
[del.icio.us] [Digg] [Facebook] [Twitter]

45 Responses

  1. Anoop Prasad Says:

    Very good and self-descriptive article for experienced as well as new Linux users.

  2. zeebie Says:

    u r awesome

  3. egwell emiru david Says:

    thank you really descriptive article.
    good work.

  4. Drew McLellan Says:

    Brilliant – thanks.

  5. Sujit Says:

    Brilliant!!!

  6. enginekeg Says:

    i am new and this worked perfectly – thanks!

  7. Dax Abraham Says:

    Excellent post !!!

  8. Mark Stevens Says:

    I was having problems obtaining the correct set of dependencies for the yum rpm even with a Redhat Subscription!, following your post was seamless and worked perfectly with rh4 vm appliance shipped from Redhat.

    10 out of 10!

  9. Pramod Reddy Patlolla Says:

    Awesome!

  10. liam Says:

    most excellent!

  11. Gadjo Says:

    Great Article! Thanks!

  12. softrocker Says:

    on running yum update i get the following error:
    Cannot open/read repomd.xml file for repository: sagator
    no more mirrors to try
    error 404: not found

  13. vijay Says:

    Hey, I have done everthing. but didn’t worked .. all the 5 packages were installed. yum: command not found.

  14. queenGoxy Says:

    web2:~ # rpm -ivh python-elementtree-1.2.6-7.el4.rf.i386.rpm
    warning: python-elementtree-1.2.6-7.el4.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
    error: Failed dependencies:
    libexpat.so.0 is needed by python-elementtree-1.2.6-7.el4.rf.i386

    i don’t know where to find this package, i’ve tried everything..

  15. khalifah Says:

    thanks a lot guy…

    I’m a new member of your site….

    please tech me….

  16. MSD Says:

    Very good assistance with this..

  17. NewtoLinux Says:

    thnx a lot dude…
    it worked fine with me…
    vijay, create a blank file /etc/yum.conf.
    and it should work.

  18. Kamal Says:

    I got an error:

    [root@Chicago yum]# yum update
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    No module named yum

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It’s possible that the above module doesn’t match the
    current version of Python, which is:
    2.2.2 (#1, Feb 24 2003, 19:13:11)
    [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)]

    If you cannot solve this problem yourself, please go to
    the yum faq at:
    http://wiki.linux.duke.edu/YumFaq

    [root@Chicago yum]# yum install wireshark
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    No module named yum

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It’s possible that the above module doesn’t match the
    current version of Python, which is:
    2.2.2 (#1, Feb 24 2003, 19:13:11)
    [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)]

    If you cannot solve this problem yourself, please go to
    the yum faq at:
    http://wiki.linux.duke.edu/YumFaq

    [root@Chicago yum]#

  19. com4host Says:

    yum updateroot@server [/]# yum update
    Traceback (most recent call last):
    File “/usr/bin/yum”, line 4, in ?
    import yum
    File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 36, in ?
    import config
    File “/usr/lib/python2.4/site-packages/yum/config.py”, line 23, in ?
    from parser import ConfigPreProcessor
    File “/usr/lib/python2.4/site-packages/yum/parser.py”, line 3, in ?
    import urlgrabber
    File “/usr/lib/python2.4/site-packages/urlgrabber/__init__.py”, line 53, in ?
    from grabber import urlgrab, urlopen, urlread
    File “/usr/lib/python2.4/site-packages/urlgrabber/grabber.py”, line 406, in ?
    import keepalive
    File “/usr/lib/python2.4/site-packages/urlgrabber/keepalive.py”, line 339, in ?
    class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
    AttributeError: ‘module’ object has no attribute ‘HTTPSHandler’

  20. Ashik Uzzaman Says:

    Thanks for the excellent instruction set. When I ran the last command “yum update”, it failed at the very end with the following error –
    Error: Missing Dependency: nmap = 2:4.20 for package: nmap-frontend

    I guess I have to download that package. I tried searching in google but confused about the version to download as none of those I find are 2:4.20 . Where can I get the exact command to download that?

  21. Thomas Hallock Says:

    Thank you for the straight-forward and helpful instructions for this debian tourist :)

  22. Manoj Prasanna Says:

    thanx frnd.this is very helpful.

  23. ken Feng Says:

    Please help to fix yum update error:
    Error: Missing Dependency: nmap = 2:4.20 for package: nmap-frontend

  24. mjetuljcek Says:

    realy nice “know how” instructions…
    THX

  25. com4host.com Says:

    hi
    i have error
    # yum update
    Traceback (most recent call last):
    File “/usr/bin/yum”, line 28, in ?
    import yummain
    ImportError: No module named yummain

  26. felix Says:

    i found a solution to the yum issue…

    The link is :

    http://fir3net.com/UNIX-/-Linux/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html

  27. Sreekanth Says:

    Very good briefing on how to get yum for RHEL ES 4. Thanks. Worked for me :)

  28. yasusu Says:

    I got a good information!
    Very Thanks.(from Japan)

  29. Tuo Says:

    Terrific! Thanks a lot.

  30. Russell Nawaz Says:

    Thanks wont be enough to you.

  31. Fernando Says:

    Perfect! Thak you! Congratulation!

  32. Dhananjay Says:

    gr8 article dear :)

  33. Penesaurio Says:

    You rock :D thx a lot!!

  34. Mad Says:

    Thank you! great article!

  35. Diego Leon Says:

    Excellent friend!!! It’s like reading an ABC book ;-)

  36. Dan Says:

    Excellent, everything works smoothly! Thank you very much.

  37. Dan Says:

    Just want to add if the repository doesn work you can add the following:

    [main]
    cachedir=/var/cache/yum
    debuglevel=2
    logfile=/var/log/yum.log
    pkgpolicy=newest
    distroverpkg=redhat-release
    tolerant=1
    exactarch=1

    [base]
    name=CentOS-$releasever – Base
    baseurl=http://mirror.centos.org/centos/4/os/i386/
    gpgcheck=1

    [updates]
    name=Red Hat Linux $releasever – Updates
    baseurl=http://mirror.centos.org/centos/4/updates/i386/
    gpgcheck=1

  38. Linh Nguyen Says:

    Thank you. This tutorial is very helpful for newbies like me

  39. nomad Says:

    Thank you very much.

  40. Abdo AL-Mjed Says:

    [root@localhost root]# yum update
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    No module named yum

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It’s possible that the above module doesn’t match the
    current version of Python, which is:
    2.2.2 (#1, Feb 24 2003, 19:13:11)
    [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)]

    If you cannot solve this problem yourself, please go to
    the yum faq at:
    http://wiki.linux.duke.edu/YumFaq

  41. Sanjeev Says:

    Very clear and consise instructructions. You saved my day.

  42. Ahamed Bauanih Says:

    Thank You for your nice & helpful article.

  43. Buddhika Says:

    Thanxxx a lot.. Its really helpfull..

  44. Chayan Says:

    Thanks a lot ! Worked like a charm

  45. Mohamed Says:

    Thank you!! very helpful

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.