[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Problem with shared libraries



Stefaan de Keersmaeker wrote:
> RH9 System
> # rpm -ivh mrtg-2.9.17-13.i386.rpm 
> error: Failed dependencies:
> libgd.so.1.8 is needed by mrtg-2.9.17-13

What is the exact dependency?  This command should print that.

  rpm -q --requires mrtg-2.9.17-13

> libgd.so.1.8 is provided by gd-1.8.4-11.i386.rpm 
> 
> # rpm -ivh gd-1.8.4-11.i386.rpm 
> Preparing... ########################################### [100%]
> package gd-2.0.23-hc1 (which is newer than gd-1.8.4-11) is already installed

What does gd-2.0.23-hc1 provide?  This command should print that.

  rpm -q --provides gd-2.0.23-hc1

If the files do not conflict then you will have to --force the older
package onto the machine to override the rpm check on newer packages.
I hate to suggest --force.  But I don't know of any other way around
this type of problem.  If you had installed the older package first
and then run rpm -ivh on the newer package there would be no issue and
it would work.  So an alternate thing to do if you have both packages
is to erase the newer one, install the older one, install the newer
one.  If there are no file conflicts then that should have the same
effect.  I would check the package file contents and --force the older
package onto the machine if there are no file conflicts.

> OK
> I do:
> # locate libgd.so
> /usr/lib/libgd.so.2
> /usr/lib/libgd.so.2.0.0
> 
> As I have libgd.so.2 I make a symbolic link:
> 
> ln -s /usr/lib/libgd.so.2 /usr/lib/libgd.so.1.8
> [...pulled up..]
> should that not be backward compatible with libgd.so.1.8?

Because there was an SONAME change I will assume it was done for a
reason and that this won't work.  The program might appear to run okay
in some cases.  But it is not 100% guarenteed.  It all depends on what
routines from the shared library are needed by a particular
application.  That is why SONAMEs exist.  To make this work in all
cases.  In any event rpm won't know about this.

> But still I get 
> 
> # rpm -ivh mrtg-2.9.17-13.i386.rpm 
> error: Failed dependencies:
> libgd.so.1.8 is needed by mrtg-2.9.17-13

Right.  Since rpm does not know about your symlink it still does not
have any package in the rpm database that provides libgd.so.1.8.

> And should the symbolic link not fix this issue?

No.  The rpm database does not know about your symlink.

  rpm -q --whatprovides libgd.so.1.8

It still needs that that requirement to be filled by something.

I have reached the 4kb mailing list limit so I will continue in a
second message...

Bob


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]