RedHat apt

From Noah.org
Revision as of 17:05, 25 August 2008 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Running apt on RedHat rules!

I've always had mixed feelings about Red Hat and RPMs. I never cared for `up2date` because the repository is so small. Getting YUM to work on RHEL4 was like trying to pass a kidney stone. Then I discovered that you can get Apt for Red Hat (I use RHEL4-64bit). Not only that, but it was super easy to install.

You just have to grab one RPM from Dag RPM Repository. The RHEL packages will work on the corresponding CentOS. For example, on my system I did the following (for some reason I had to download it first. I could not install directly from the URL):

wget http://dag.wieers.com/rpm/packages/apt/apt-0.5.15lorg3.2-1.el4.rf.x86_64.rpm
rpm --install apt-0.5.15lorg3.2-1.el4.rf.x86_64.rpm

Now welcome to Apt! You just need to update your apt cache and start using apt:

apt-get update

Sometimes the apt sources repository list does not get created. I'm not sure why this is. I created a sources file in /etc/apt/sources.list.d/rpmforge.list with the following content:

# Name: RPMforge RPM Repository for Red Hat Enterprise 4 - dag
# URL: http://rpmforge.net/
#rpm http://apt.sw.be redhat/el$(VERSION)/en/$(ARCH) dag
repomd http://apt.sw.be redhat/el$(VERSION)/en/$(ARCH)/dag

Then I ran apt-get `update again` and everything was fine.

The default repository is RPMforge. Note that this version of Apt uses RPMs, not DEB packages, so it's compatible with any other RPM management tools you may have used on the system.

Errors

If you get errors like these:

error: Failed dependencies:
        librpm-4.2.so()(64bit) is needed by apt-0.5.15lorg3.2-1.el3.rf.x86_64
        librpmdb-4.2.so()(64bit) is needed by apt-0.5.15lorg3.2-1.el3.rf.x86_64
        librpmio-4.2.so()(64bit) is needed by apt-0.5.15lorg3.2-1.el3.rf.x86_64

Then you are probably installing the wrong apt RPM. Go back to Dag Apt RPMs and confirm that you are getting the RPM that matches your Red Hat platform. This happened to me when I tried to install RHEL3 RPMs on a RHEL4 machine. Cut and paste error.