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]

56 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

  46. Greymeister Says:

    Thanks a ton, this worked great for me on RHEL4 AS

  47. Pippen Says:

    Muy Bueno Al FIN!!!!
    alguien que pone buenas cosa y que funcionan!!!
    Gracias Amigo

    DESDE PARAGUAY

  48. manish12 Says:

    As root,
    cd ~
    mkdir setups
    cd setups
    wget http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.7.tar.gz
    tar -xvzf yum-2.0.7.tar.gz
    cd yum-2.0.7
    ./configure
    make
    make install

  49. Marcio Says:

    Congratulations article

    My name is Marcio and I’m from Sao Paulo Brazil,

    I hope to exchange information and articles with you,

    hugs,

    Marcio

  50. alex Says:

    Hi,
    do you have any update on this one? Haven’t found any other good guides for this subject.

  51. Noel Says:

    Had to get libsqllite from here:
    http://fr2.rpmfind.net/linux/rpm2html/search.php?query=libsqlite.so.0

  52. Manni Says:

    Great job buddy…

  53. vilas bhakde Says:

    thanks it’s awesome

  54. Bala Says:

    Hi while updating yum i am getting this error.

    bash-3.2$ sudo yum update
    Loaded plugins: rhnplugin, security
    Repository rhel-debuginfo is listed more than once in the configuration
    Traceback (most recent call last):
    File “/usr/bin/yum”, line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
    File “/usr/share/yum-cli/yummain.py”, line 309, in user_main
    errcode = main(args)
    File “/usr/share/yum-cli/yummain.py”, line 157, in main
    base.getOptionsConfig(args)
    File “/usr/share/yum-cli/cli.py”, line 187, in getOptionsConfig
    self.conf
    File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 664, in
    conf = property(fget=lambda self: self._getConfig(),
    File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 253, in _getConfig
    self.plugins.run(‘init’)
    File “/usr/lib/python2.4/site-packages/yum/plugins.py”, line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
    File “/usr/lib/yum-plugins/rhnplugin.py”, line 111, in init_hook
    login_info = up2dateAuth.getLoginInfo()
    File “/usr/share/rhn/up2date_client/up2dateAuth.py”, line 217, in getLoginInfo
    login()
    File “/usr/share/rhn/up2date_client/up2dateAuth.py”, line 184, in login
    li = server.up2date.login(systemId)
    File “/usr/share/rhn/up2date_client/rhnserver.py”, line 52, in __call__
    raise self.__exception_from_fault(f)
    up2date_client.up2dateErrors.AbuseError:
    Error Message:
    Abuse of Service detected for server rhel5-64 (1016133212)
    Error Class Code: 49
    Error Class Info:
    You are getting this error because RHN has detected an abuse of
    service from this system and account. This error is triggered when
    your system makes too many connections to Red Hat Network. This
    error can not be triggered under a normal use of the Red Hat Network
    service as configured by default on Red Hat Linux.

    The Red Hat Network services for this system will remain disabled
    until you will reduce the RHN network traffic from your system to
    acceptable limits.

    Please log into RHN and visit https://rhn.redhat.com/help/contact.pxt
    to contact technical support if you think you have received this
    message in error.

    Please help to solve this

  55. Bill McEachen Says:

    this procedure posting was very helpful, w/ minor tweaks it worked bang-on. Thanks!

  56. sathya narayana Says:

    how to install the yum in terminal

Leave a Comment

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