30 September 2009 - 15:21CentOS / RHEL repo madness
Our school’s local LUG had an InstallFest this past weekend. I encountered and solved a problem with RHEL/CentOS and extra repositories with conflicting dependencies for media players like vlc and mplayer which seems to be rather common, so I decided to document it here.
I’m a Debian user, so I’m used to having a very large set of packages in the base repositories. On a typical Debian desktop system of mine, I may have the base repos with main, contrib and non-free plus debian-multimedia.org (and backports.org and volatile.debian.org on servers running stable). On RHEL, the set of base packages is much smaller; CentOS (plus the CentOS plus) has a little bit more but basically the same issues. So people tend to add a bunch of other repositories like the EPEL, rpmforge, RPM Fusion, or individual repos included in those umbrellas like Dries, DAG, Livna, etc. With the proliferation of repositories comes duplicated effort and problems with mutual compatibility.
For example, consider loading a RHEL 5.4 system from scratch and adding the EPEL and rpmforge repos:
- Install EPEL:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm - Install rpmforge:
rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.`uname -m`.rpm[0]
On CentOS I would now add yum-priorities (yum install yum-priorities) and set relative priorities for the different repos. But either way, let’s say you now try to install vlc with yum install vlc and it explodes with the following:
vlc-0.9.9a-3.el5.rf.x86_64 from rpmforge has depsolving problems --> Missing Dependency: libcucul.so.0()(64bit) is needed by package vlc-0.9.9a-3.el5.rf.x86_64 (rpmforge) vlc-0.9.9a-3.el5.rf.x86_64 from rpmforge has depsolving problems --> Missing Dependency: libdvdread.so.3()(64bit) is needed by package vlc-0.9.9a-3.el5.rf.x86_64 (rpmforge) Error: Missing Dependency: libdvdread.so.3()(64bit) is needed by package vlc-0.9.9a-3.el5.rf.x86_64 (rpmforge) Error: Missing Dependency: libcucul.so.0()(64bit) is needed by package vlc-0.9.9a-3.el5.rf.x86_64 (rpmforge)
Why is this happening? Well, for the libcucul.so.0 dependency, the EPEL packages libcaca, and so does rpmforge, but they are not entirely substitutable (there’s a similar problem with libdvdread). Usually I trust the EPEL more (and give it a better priority) since it is more “official” and Redhat-endorsed (and has high quality packaging standards), but in this case we need to satisfy all of the dependencies from rpmforge. So, I use the following command:
yum --disablerepo='epel' install vlc
For the system at the InstallFest, it was even more complex because it had the EPEL, rpmforge and RPM Fusion and some packages from each. I had to disable all but rpmforge and install libcaca and caca-utils and then disable RPM Fusion to properly install vlc (and first I had to remove the libcaca package that was pulled in from the EPEL). yum was developed in part to resolve “rpm dependency hell”, but these warring packaging factions are causing the same problems to be exposed again to the user through yum, which is frustrating.
[0] Right now packages.sw.be seems to be broken in some places so you can grab from say http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/`uname -m`/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.`uname -m`.rpm
11 Comments | Tags: Linux