[KLUG Members] rpm wierdness

Adam Tauno Williams members@kalamazoolinux.org
20 Jul 2001 06:44:38 -0400


>>[root@towaway /downloads]# rpm -Fvh snort-1.8p1-0.i386.rpm
>>error: failed dependencies:
>>        libpq.so.2.0 is needed by snort-1.8p1-0
>> 
>>[root@towaway /downloads]# cd /usr/lib
>> 
>>[root@towaway lib]# ls -al libpq*
>[..]
>>lrwxrwxrwx    1 root     root           12 Feb 15 13:46 libpq.so.2.0 ->
>>libpq.so.2.1
>>-rwxr-xr-x    1 root     root        79482 Aug 24  2000 libpq.so.2.1
>>[root@towaway lib]#
>>OK, so libpq.so.2.0 is installed on my system as a symbolic link to
>>libpq.so.2.1.
>>Any ideas on why rpm dependency check can't see it?
>I have run into this many times before - especially when stalling
>'out-of-my-distribution' RPMs (i.e. install mandrake, suse or mirror-contrib
>rpm's on a redhat install, etc).  Don't quote me on this, but I think that rpm
>refers to its database rather than the actual presence of the file(s) it needs.

Yes.  Which really makes sense when you think about it.

>If for some reason it doesn't see an entry for libpq.so.2.0, it will think
>it's not installed.  Simply override the dependencies (the second try) with
>--nodeps once you have verified the file exists on your system.

Yes,  this is the correct solution.  So long as the library mentioned is
in your library search path (which /usr/lib obviously it)

>I also run into this a lot if I upgrade to a 'newer than expected' library.  It
>can be dangerous sometimes, but generally if I install a new 'major' version -
>for example, I often upgrade ncurses beyond what the distribution supports -
>from say ncurses-3.2 to ncurses-4.0, most of the old functionality is 'usually'
>supported.

I like to keep old version around.  If I see that an RPM is going to
remove a bunch of libraries and replace them I make copies first, remove
the RPM and then put them back.  Programs work best (IMHO) using very
close to the same version they were linked to.  Since Linux, unlike some
other OSes, lets you have multiple versions of the same library
available, why not exercise this right.  You CAN run into problems,  but
usually nothing ldd, LD_LIBRARY_PATH, ln, and rm can't fix. :)

See the debugging presentation to understand more library madness:
http://www.kalamazoolinux.org/presentations/20001017/

>The clean way to fix this in many cases is to get the .src.rpm and do a:
>--rebuild But if you just want a quick and grubby way to do it (once you fix 
>any other dependency problems and verify no other needed parts are
>missing), just run the install again with --nodeps

rebuilddb is something one should periodically do anyway.