mikeraz has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
We're beating our head against a wall. Consider:
This dies with message:BEGIN { $ENV{"LD_LIBRARY_PATH"} = /usr/local/lib:/usr/platform/SUNW,Ultra-80 +/lib:/usr/lib"; } ... code ... $dbh = DBI->connect('DBI:Sybase:CIC7P', 'mikeraz', 'bruised_head',{ Ra +iseError => 0, PrintError => 1, PrintWarn => 1}) ;
but if I, before running the program set up my environment:DBI 1.48-nothread default trace level set to 0x0/5 (pid 11864) -> DBI->connect(DBI:Sybase:CIC7P, mikeraz, ****, HASH(0x152e54)) -> DBI->install_driver(Sybase) for solaris perl=5.008005 pid=11864 + ruid=12647 euid=12647 install_driver(Sybase) failed: Can't load '/usr/local/lib/perl5/site_p +erl/5.8.5/sun4-solaris/auto/DBD/Sybase/Sybase.so' for module DBD::Syb +ase: ld.so.1: perl: fatal: libgcc_s.so.1: open failed: No such file o +r directory at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm +line 230.
bash-2.05$ LD_LIBRARY_PATH=/usr/local/lib:/usr/platform/SUNW,Ultra-80/lib:/usr/lib bash-2.05$ export LD_LIBRARY_PATHthe script runs fine.
We're at a loss for why setting LD_LIBRARY_PATH from within the script doesn't work. The script is called from a program and the UID that it operates under does not have LD_LIBRARY_PATH defined. Nor, in our corporate environment, can it be.
Suggestions?
Update: node DynaLoader and LD_LIBRARY_PATH and programatically setting the LD_LIBRARY_PATH have the answer to this question and more background on how to put it into effect.
Michael 'off to Super Search School' R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ENV setting for library loading failure
by traveler (Parson) on Jan 25, 2006 at 23:25 UTC | |
by mikeraz (Friar) on Jan 25, 2006 at 23:28 UTC | |
by traveler (Parson) on Jan 26, 2006 at 00:04 UTC | |
by traveler (Parson) on Jan 26, 2006 at 00:10 UTC | |
by Fletch (Bishop) on Jan 25, 2006 at 23:39 UTC | |
by CountOrlok (Friar) on Jan 26, 2006 at 09:27 UTC | |
|
Re: ENV setting for library loading failure
by Mandrake (Chaplain) on Jan 26, 2006 at 02:05 UTC | |
|
Re: ENV setting for library loading failure (link)
by tye (Sage) on Jan 26, 2006 at 09:39 UTC |