msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

25 May 2009 Replace RPMforge packages with Redhats own on a RHEL5 system

Posted by

This post came to life after experiencing some upgrade problems with missing dependencies and RPM packages from RPMforge and Redhat Enterprise Linux Client release 5. The prosess to remove or replace the packages was to remove RPMforge as a package repository and replace the blocking packages with Redhats own packages.

The process of replacing RPMforge packages with Redhats own packages
First we remove rpmforge as package repository

rpm -e rpmforge

This command removes the /etc/yum.repos.d/rpmforge.repo file.

Then we list all packages installed from the RPMforge repository to get an overview of the packages causing problems on the system.

rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf

The result

dnsmasq-2.47-x86_64-1.el5.rf
libsndfile-1.0.17-x86_64-1.el5.rf
lftp-3.7.12-x86_64-1.el5.rf
...

The rf ending tells you that these packages are RPMforge packages. This command also tells you if it is 32bit (i386) or 64bit (x86_64) packages. I’ve described the prosess of removing 32- and 64bits packages in a earlier post named Remove duplicate packages when querying the rpm database.

Howto remove 64bit packages

yum remove libsndfile.x86_64

Next we will download the packages we want to replace, in my case dnsmasq

On a RHEL5 system

yumdownloader dnsmasq

If you don’t have yumdownloader in your system you have to install the yum-utils package.

On a RHEL4 system

up2date -d dnsmasq

Then we replace the RPMforge RPM package with Redhats own package

# rpm -Uvh --replacepkgs --oldpackage dnsmasq-2.45-1.el5_2.1.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:dnsmasq                ########################################### [100%]

If you don’t use the –oldpackage option you might get an error message like this

package dnsmasq-2.47-1.el5.rf.x86_64 (which is newer than dnsmasq-2.45-1.el5_2.1.x86_64) is already installed

I continued removing RPMForge packages until yum managed to resolve any unresolved dependencies.

Tags: , , ,

Comments are closed.