Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set LD_LIBRARY_PATH so use method sees it

Status
Not open for further replies.

bloke

Programmer
Apr 23, 2001
9
0
0
AU
Hi There,

I want to be able to set LD_LIBRARY_PATH in my perl script and have the use methods know that this is where they should look for libraries. But if I put $ENV above use, the use method still does not find what I am looking for. Obviously the way the script is parsed means that the use methods get read first. Any ideas would be greatly appreciated
 
bloke

Do you want to pick up perl libraries idf so use the use lib directive.

If you want to point at different libs, you may need to append a directory string to the lib in question
Code:
$LD_LIB_PATH='/where/ever/you.want/to/point/';
$LIB1=$LD_LIB_PATH."library1";

HTH
--Paul
[/code]
 
Hi Paul,

The script is a cgi routine that connects to Oracle9i 64 bit. The same routine worked under 8i but I found a thread that pointed to a problem with 9i. Essentially, the LD_LIBRARY_PATH environment variable needs to be set to point at the 32bit oracle library. The script will fail at runtime on 'use Oraperl' because it thinks we are using 64 bit. How I got around it at the moment was to have my html page first call a shell script that sets the LD_LIBRARY_PATH and then call the CGI/perl script. This actually gives a benefit because I can set my ORACLE_SID in here and then call oraenv so that the CGI script is environment independent.

Thanks

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top