Installing yum on RHEL4

I think I have found the simplest way to install yum on RHEL4 incase anyone needs help.

The website has most of the rpm’s you will need.

Install the following files in this order:

  • there are x86_64 versions available as well

Next you need to download yum from

  • save this file to disk, do not try to use the rpm installer because it is a src rpm.

Next cd to the directory where you saved the file and use the following commands to install yum.

  1. rpmbuild --rebuild yum-2.4.3-1.src.rpm
  2. cd /usr/src/redhat/RPMS/noarch
  3. rpm -i yum-2.4.3-1.noarch.rpm

There ya have it, yum should be installed and working. You can now run the script with no problems.

Found a much easier way using apt-get.

  1. install apt-get, browse the directory for the correct version

    rpm -Uvh

  2. add the following line to to /etc/apt/sources.list.d/os.list
    repomd el4-i386/atrpms/stable

  3. import the atrpms GPG key

    rpm --import

  4. update apt-get

    apt-get update

  5. install yum

    apt-get install yum

you may want to run ‘apt-get dist-upgrade’ to upgrade all your rpms

Argh! Don’t install apt-get! I just noticed that our package updates module stops working when you have apt-get installed on a system that normally uses up2date or yum for system updates (it’s due to the way it auto-detects available sources). :wink:

apt-get for RPM is a dead project now, anyway, and probably isn’t an ideal choice for any purpose.

I didn’t think the current version of had the bug that triggered calling yum before it was actually available. But if it does, it’s definitely fixed in the next release.