Installing yum on RHEL4

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

The website http://atrpms.net/dist/el4/ has most of the rpm’s you will need.

Install the following files in this order:

  • there are x86_64 versions available as well
  1. http://atrpms.net/dist/el4/sqlite/sqlite-3.1.2-2.99_2.el4.at.i386.rpm
  2. http://atrpms.net/dist/el4/sqlite/sqlite-devel-3.1.2-2.99_2.el4.at.i386.rpm
  3. http://atrpms.net/dist/el4/pythonabi/pythonabi-2.3-3.el4.at.i386.rpm
  4. http://atrpms.net/dist/el4/python-sqlite/python-urlgrabber-2.9.9-1.99_5.el4.at.noarch.rpm
  5. http://atrpms.net/dist/el4/python-sqlite/python-sqlite-1.1.7-1.2.0.99_4.el4.at.i386.rpm
  6. http://atrpms.net/dist/el4/python-elementtree/python-elementtree-1.2.6-4.2.1.99_12.el4.at.i386.rpm

Next you need to download yum from http://linux.duke.edu/projects/yum/download/2.4/yum-2.4.3-1.src.rpm

  • 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 install.sh 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 http://dag.wieers.com/packages/apt/apt-latest-version.el4.rf.i386.rpm

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

  3. import the atrpms GPG key

    rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

  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 install.sh had the bug that triggered calling yum before it was actually available. But if it does, it’s definitely fixed in the next release.