[ Table Of Contents ][ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8 [ Index of Past Answers ]


(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to linux-questions-only@ssc.com

There is no guarantee that your questions here will ever be answered. Readers at confidential sites must provide permission to publish. However, you can be published anonymously - just let us know!


(?) Dependency Hell

From Andrew

Answered By Thomas Adams, Dan Wilder, Heather Stern

(?) Hello Gang,

Hope you don't minding me milking some knowledge from you. One thing that has been bugging me for a while now is this.

I am running Redhat 6.1 with a recompiled kernel (2.2.19)..

This is the thing though. There are given programs that i may/do want to install that need different libraries for them to work. Most of my upgrades have been via rpm -U scenario (easy to keep track of what is on my system).

I need to install gcc which when i do the following i get this

[root@echelon /root]# rpm -ivh gcc-2.96-54.i386.rpm
error: failed dependencies:
        cpp =3D 2.96 is needed by gcc-2.96-54

so then i do this

[root@echelon /root]# rpm -q cpp
cpp-1.1.2-24

so i better upgrade

[root@echelon /root]# rpm -U cpp-2.96-85.i386.rpm
error: failed dependencies:
        libc.so.6(GLIBC_2.2)   is needed by cpp-2.96-85
        cpp =3D 1.1.2 is needed by egcs-1.1.2-30
        cpp =3D 1.1.2 is needed by egcs-objc-1.1.2-30

Mmmm i know GLIBC is pretty important so i get the version above & do the following

[root@echelon /root]# rpm -q glibc
glibc-2.1.3-22

so ok lets upgrade this (or at least try to)

[root@echelon /root]# rpm -U glibc-2.2-12.i386.rpm
error: failed dependencies:
        glibc-common =3D 2.2 is needed by glibc-2.2-12
        glibc > 2.1.3 conflicts with db3-3.1.17-4.6x
        glibc > 2.1.3 conflicts with rpm-4.0-6x
        libdb.so.2 is needed by enlightenment-conf-0.15-9
        libdb.so.2 is needed by pan-0.9.1-0_helix_1
        libdb.so.2 is needed by ggv-0.95-0_helix_1
        libdb.so.2 is needed by pygnome-1.0.53-0_helix_3
	[ . . . about 70 more complaints . . . ]
        libdb.so.3(GLIBC_2.1) is needed by perl-5.00503-6
        libdb.so.3(GLIBC_2.1) is needed by pam-0.72-20.6.x
        libdb.so.3(GLIBC_2.1) is needed by php-3.0.18-1.6.x
        libdb.so.3(GLIBC_2.1) is needed by sendmail-8.11.0-1
        libdb.so.3(GLIBC_2.1) is needed by openldap-1.2.9-6

Do you see wehat i am getting at

How would you get around these issues it can become rather frustrating

Any advice on this would be great like always

Thanx guys n girls

Regards

Andrew

(!) [Thomas] Hi Andrew,
Yuck!! You have managed to expose one of the more annoying features that the RPM format brings....version dependant files.
Since every package (or nearly every) is linked to another, you can imagine just how one package may be needed by another.
To try and get arounf your problem, you can specify to install an RPM file without looking for it's dependencies, thus:

rpm -i --nodeps ./rpmfile-version-3.rpm
But, one caveat with this, is that if you don't have/install the dependencies, then the program might not work.
Hope That Helps
(!) [Dan] It is a common problem. The common solution is to upgrade the installation using the upgrade method provided by the distribution. It may be time for you to upgrade across-the-board to Redhat 7.1.
It is possible to upgrade a distribution piecemeal, but it becomes more difficult (as you have observed) as the number of dependencies increases.
The alternative is going off-distribution and building the specific things you need from source, one at a time. This is more often not worth the effort.
(!) [Heather] Heh. Jim calls this "dependency hell". Every distro has it. Debian is pretty good about reducing the number of parts in the puzzle -- about the time you're looking at upgrading glibc, they call it the next version name, and a lot of people bust their butts to make the upgrade smooth. Of course, unless you're using LibraNet or something, the install is a bit rocky...
For staying with an older distro a bit longer (hey, it's not crashing, why change it much, right?) my common solution is to remove the offending rpms, use alien (a perl script) to transform deb files from the equivalent Debian variant, and then use those to provide the libraries and so on, that just my app needs. I've used this trick to introduce lynx-ssl to a number of systems that otherwise only come with a non-SSL version, often a bit old.
Nonetheless, I agree with Dan -- once you've decided to upgrade glibc, it's time to take your upgrade seriously, and make a new round of it. Distros vary widely as to whether it's safer to upgrade or to just install anew; with a good backup of all your personal files (don't forget odd things like any tweaks you made to config files in /etc/ or /usr/lib, notes about hardware you have and need support for, etc.) you can try an upgrade, and if it bombs, then install fresh.


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 71 of Linux Gazette October 2001
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8 [ Index of Past Answers ]