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

Re: A newbie question about competing libs



On 06/25/2008 08:38 PM, buyoppy wrote:
>  When I tried to build some application which requires the
> latest version of some other lib, first I installed that
> required lib from source into /usr/local/lib and
> ldconfiged. 

That wasn't a good idea.

> Older version of that lib which was installed
> from package remains at /usr/lib. Then I tried to build
> target application, I got a lot of "undefined reference"
> errors.

Remove the new version of the library in /usr/local/lib.

>  I don't know the "usual" way to solve such a problem.
> Should I uninstall older version of lib from /usr/lib?

No.

> Should I make(or change) link at /usr/lib to the latest
> one ? Or should I install the latest version into
>  usr/lib(not /usr/local/lib) in the first place? Or
> should I deal with it by configuring options appropriately
> during building process(I tried this by adding
> -L/usr/local/lib...)?
>  Could you give me any suggestion?
> 

What library is this?

Whatever it is, remove it from /usr/local/lib and do ldconfig again. It
might even be a good idea to reboot after this.

Rebuild the library to go into a non-standard place for libraries, e.g.
/usr/local/exotic. Do NOT do ldconfig. Normal processes need to link
with the libraries in /usr/lib, but /usr/local/lib overrides /usr/lib,
so confusion may result, and some programs (e.g. bash) may become unusable.

The application that you are trying to build can be told to look into
/usr/local/exotic for libraries. Look at the output of "./configure --help"

After you've installed the application, you may or may not need to set
LD_LIBRARY_PATH to /usr/local/exotic or something similar. Good luck.


Reply to: