Installing CentOS packages on Red Hat Enterprise Linux
At the weekend I got into a discussion with Andy Stanford-Clark and Richard Appleby on Twitter troubleshooting basic application installation in Red Hat Enterprise Linux (like Pidgin). Not finding a solution later began to plague me, I grabbed a copy of RHEL and installed it on a Virtual Machine to solve the problem. If you're interested in the history of the Red Hat-based distributions, please see my other article.
Are you registered to the Red Hat Network (RHN)?
If not, you will see messages like this when trying to use the "yum" package installer:
[root@localhost ~]# yum install pidgin
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package pidgin available.
Nothing to do
[root@localhost ~]#
Don't panic, you might be able to use CentOS packages
First you need to add the CentOS repository, create this file using your favorite text editor:
[root@localhost ~]# vi /etc/yum.repos.d/centos.repo
Adding the following contents, note the '5' has to be hardcoded to either 5 or 6 depending on your RHEL version:
[centos]
name=CentOS $releasever - $basearch
baseurl=http://ftp.heanet.ie/pub/centos/5/os/$basearch/
enabled=1
gpgcheck=0
Once you've completed this step, you can now use "yum" to install CentOS packages.
Installing a package from CentOS
Here we're installing the popular IM client Pidgin from the CentOS repository:
[root@localhost ~]# yum install pidgin
Loaded plugins: rhnplugin, security
Repository centos is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
centos                                           | 1.1 kB     00:00
centos/primary                                   | 967 kB     00:03
centos                                                        2725/2725
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pidgin.i386 0:2.6.6-5.el5_7.4 set to be updated
--> Processing Dependency: libpurple = 2.6.6-5.el5_7.4 for package: pidgin
--> Processing Dependency: libgtkspell.so.0 for package: pidgin
--> Processing Dependency: libpurple.so.0 for package: pidgin
--> Running transaction check
---> Package gtkspell.i386 0:2.0.11-2.1 set to be updated
---> Package libpurple.i386 0:2.6.6-5.el5_7.4 set to be updated
--> Processing Dependency: libmeanwhile.so.1 for package: libpurple
--> Processing Dependency: cyrus-sasl-md5 for package: libpurple
--> Processing Dependency: libsilcclient-1.0.so.1 for package: libpurple
--> Processing Dependency: libsilc-1.0.so.2 for package: libpurple
--> Running transaction check
---> Package cyrus-sasl-md5.i386 0:2.1.22-5.el5_4.3 set to be updated
--> Processing Dependency: cyrus-sasl-lib = 2.1.22-5.el5_4.3 for package: cyrus-sasl-md5
---> Package libsilc.i386 0:1.0.2-2.fc6 set to be updated
---> Package meanwhile.i386 0:1.0.2-5.el5 set to be updated
--> Running transaction check
--> Processing Dependency: cyrus-sasl-lib = 2.1.22-5.el5 for package: cyrus-sasl-plain
--> Processing Dependency: cyrus-sasl-lib = 2.1.22-5.el5 for package: cyrus-sasl
---> Package cyrus-sasl-lib.i386 0:2.1.22-5.el5_4.3 set to be updated
--> Running transaction check
---> Package cyrus-sasl.i386 0:2.1.22-5.el5_4.3 set to be updated
---> Package cyrus-sasl-plain.i386 0:2.1.22-5.el5_4.3 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package            Arch    Version                   Repository            Size
================================================================================
Installing:
 pidgin             i386    2.6.6-5.el5_7.4          centos               1.5 M
Installing for dependencies:
 cyrus-sasl-md5     i386    2.1.22-5.el5_4.3         centos                46 k
 gtkspell           i386    2.0.11-2.1                centos                30 k
 libpurple          i386    2.6.6-5.el5_7.4          centos               8.3 M
 libsilc            i386    1.0.2-2.fc6               centos               412 k
 meanwhile          i386    1.0.2-5.el5               centos               108 k
Updating for dependencies:
 cyrus-sasl         i386    2.1.22-5.el5_4.3         centos               1.2 M
 cyrus-sasl-lib     i386    2.1.22-5.el5_4.3         centos               127 k
 cyrus-sasl-plain   i386    2.1.22-5.el5_4.3         centos                27 k
Transaction Summary
================================================================================
Install      6 Package(s)
Update       3 Package(s)
Remove       0 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): cyrus-sasl-plain-2.1.22-5.el5_4.3.i386.rpm  |  27 kB     00:00
(2/9): gtkspell-2.0.11-2.1.i386.rpm                 |  30 kB     00:00
(3/9): cyrus-sasl-md5-2.1.22-5.el5_4.3.i386.rpm    |  46 kB     00:00
(4/9): meanwhile-1.0.2-5.el5.i386.rpm               | 108 kB     00:00
(5/9): cyrus-sasl-lib-2.1.22-5.el5_4.3.i386.rpm    | 127 kB     00:00
(6/9): libsilc-1.0.2-2.fc6.i386.rpm                 | 412 kB     00:00
(7/9): cyrus-sasl-2.1.22-5.el5_4.3.i386.rpm        | 1.2 MB     00:00
(8/9): pidgin-2.6.6-5.el5_7.4.i386.rpm              | 1.5 MB     00:00
(9/9): libpurple-2.6.6-5.el5_7.4.i386.rpm           | 8.3 MB     00:04
--------------------------------------------------------------------------------
Total                                       1.3 MB/s |  12 MB     00:08
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : cyrus-sasl-lib                                               1/12
  Updating   : cyrus-sasl-plain                                             2/12
  Updating   : cyrus-sasl                                                   3/12
  Installing : cyrus-sasl-md5                                               4/12
  Installing : libsilc                                                      5/12
  Installing : gtkspell                                                     6/12
  Installing : meanwhile                                                    7/12
  Installing : libpurple                                                    8/12
  Installing : pidgin                                                       9/12
  Cleanup    : cyrus-sasl                                                  10/12
  Cleanup    : cyrus-sasl-plain                                            11/12
  Cleanup    : cyrus-sasl-lib                                              12/12
Installed:
  pidgin.i386 0:2.6.6-5.el5_7.4
Dependency Installed:
  cyrus-sasl-md5.i386 0:2.1.22-5.el5_4.3        gtkspell.i386 0:2.0.11-2.1
  libpurple.i386 0:2.6.6-5.el5_7.4               libsilc.i386 0:1.0.2-2.fc6
  meanwhile.i386 0:1.0.2-5.el5
Dependency Updated:
  cyrus-sasl.i386 0:2.1.22-5.el5_4.3       cyrus-sasl-lib.i386 0:2.1.22-5.el5_4.3
  cyrus-sasl-plain.i386 0:2.1.22-5.el5_4.3
Complete!
[root@localhost ~]#
Mission Accomplished!
You now have a working version of Pidgin with its dependencies courtesy of CentOS.
Related Posts
A brief history of Red Hat, Fedora and CentOS
Confused by Red Hat's Linux ecosystem? Learn how RHEL, Fedora, and CentOS evolved from one distribution into three distinct solutions for different needs.
Fedora Core 5: yum.conf Configuration with Additional Repositories
Complete yum.conf configuration for Fedora Core 5 including ATrpms and FreshRpms repositories for expanded package availability
What Not to Do When You've Installed sshdfilter
A cautionary tale about sshdfilter blocking localhost (127.0.0.1) and breaking core system services due to lack of trusted address exceptions