Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: [SLE] changing LD_LIBRARY_PATH
  • From: Alexandr Malusek <Alexandr.Malusek@xxxxxxxxxx>
  • Date: 16 May 2001 21:01:16 +0200
  • Message-id: <86wv7ht8xv.fsf@xxxxxxxxxxxxxxxxxxxxx>
otto porter <fmg7@xxxxxxxxxxxx> writes:

> set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mydir/lib
> export LD_LIBRARY_PATH

The correct Bash syntax is:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mydir/lib
export LD_LIBRARY_PATH

or

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mydir/lib

> Librarys are still found however, in the previously defined
> locations.

LD_LIBRARY_PATH works OK on my SuSE 7.1. A simple example how to check
it out follows:

$ strace ls 2>&1 | grep libc.so | head -1
open("/opt/mozilla/i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT

$ export LD_LIBRARY_PATH=/xxx:$LD_LIBRARY_PATH
$ strace ls 2>&1 | grep libc.so | head -1
open("/xxx/i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT

Strace lists all attempts to open shared libraries for reading; just
check the order. See also "man ld.so".

--
Alexandr.Malusek@xxxxxxxxxx

< Previous Next >
References