Subversion dependencies on cPanel servers using Yum

If you're ever had to manage a cPanel server, you've probably had a request from a customer to install Subversion, and you probably tried the Yum package manager to install it.

root@server [~]# yum install subversion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons:
* extras:
Excluding Packages in global exclude list
Setting up Install Process
Resolving Dependencies
subversion-1.4.2-4.el5_3.1.x86_64 from base has depsolving problems
--> Missing Dependency: perl(URI) >= 1.17 is needed by package subversion-1.4.2-4.el5_3.1.x86_64 (base)

cPanel is written in Perl, so the cPanel software maintains it's own Perl installation and blocks Yum from installing Perl deps. The cPanel /scripts/perlinstaller utility will show that the module needed is installed, yet Yum will not proceed.

I used to download the per-uri RPM from for my version of CentOS and install it. But an associate of mine showed me an easier way.

Edit /etc/yum.conf.
The very first line:
exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

Remove “perl*” from that line. Save and quit.
Now, install subversion. It should resolve the perl-URI dependency just fine.
Once it's completed, don't forget to edit the yum.conf file and restore the “perl*” to the exclude line, so Yum doesn't interfere with cPanel's Perl modules.

Yum Transaction Check Errors

A client tried to update his CentOS installation on his virtual server by running “yum update” and got the following error:

Transaction Check Error:
file /usr/share/X11/XKeysymDB from install of libX11-1.0.3-11.el5 conflicts with file from package libX11-1.0.3-9.el5
file /usr/include/popt.h from install of popt- conflicts with file from package popt-1.10.2-48.el5

The quick and easy fix is to remove the “installed” package that presents the conflicting files. Then let yum reinstall with appropriate versions and dependencies.

[root@vps ~]# rpm -e libX11-1.0.3-11.el5
[root@vps ~]# rpm -e popt-
[root@vps ~]# yum -y update
[root@vps ~]# cat /etc/redhat-release
CentOS release 5.4 (Final)