Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to set LD_LIBRARY_PATH

by Khen1950fx (Canon)
on Jan 09, 2012 at 06:37 UTC ( #946948=note: print w/replies, xml ) Need Help??


in reply to How to set LD_LIBRARY_PATH

I don't currently have Oracle installed, so this is untested.
#!/usr/bin/perl -l BEGIN { $ENV{ORACLE_HOME}=$ORACLE_HOME; $ENV{PATH}="$ORACLE_HOME/bin:$PATH"; $ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib"; } use strict; use warnings; use DBD::Oracle; print "$DBD::Oracle::VERSION";

Replies are listed 'Best First'.
Re^2: How to set LD_LIBRARY_PATH
by mbethke (Hermit) on Jan 09, 2012 at 07:17 UTC

    I can't think of anything to try this with right now but it's unlikely to work. Dynamically loaded modules use dlopen(3) to open libraries, whose Linux manpage says:

    o If, at the time that the program was started, the environment vari +able LD_LIBRARY_PATH was defined to contain a colon-separated list of d +irectories, then these are searched.

    Note the "at the time that the program was started" bit, which means the binary i.e. the Perl interpreter here.

Re^2: How to set LD_LIBRARY_PATH
by Khen1950fx (Canon) on Jan 09, 2012 at 07:41 UTC
    That's what I thought, too. But as I understand it now, it's unlikely to work if you set ENV after you load the modules, but it likely will work if set before you load the modules.

      but it likely will work if set before you load the modules.

      Won't, it has to be set before you run perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946948]
help
Chatterbox?
[karlgoethebier]: shmem: scheiss technik
[karlgoethebier]: shmem: yes - i f you manage it to get on the bike. and pray if you must stop...
[shmem]: in the french alpes, at the end of a gravel road, we had a beer at a hut - and heard an enduro coming up.
[shmem]: not by the road, but from there below where you wouldn't want to walk.
[shmem]: the biker stopped the machine at the table and took off his helmet.
[shmem]: long white hair, long beard the same, then he proceeded to get off the bike
[shmem]: saying "biking itself isn't that much, but getting up and down - hell!"

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-06-25 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (570 votes). Check out past polls.