issue with LD_LIBRARY_PATH



OS: Solaris 8
Oracle version 8.1.7

Perl, version 5.8.2.
DBI 1.47
DBD-Oracle-1.16

When i sets the LD_LIBRARY_PATH from the shell and run the below script
it works fine. But when i tries to set the LD_LIBRARY_PATH from a BEGIN
block in the script it throws this error

# .....perl ...distributionNameList.ipl
Can't load '/..../site/lib/auto/DBD/Oracle/Oracle.so' for module
DBD::Oracle: ld.so.1: /.../perl: fatal: libmm.so.11: open failed: No
such file or directory at ...../perl/lib/DynaLoader.pm line 229.
at /..../distributionNameList.ipl line 17
Compilation failed in require at /...../distributionNameList.ipl line
17.
BEGIN failed--compilation aborted at /..../distributionNameList.ipl
line 17.

This is the section in the script which sets the LD_LIBRARY_PATH

#!/.../path_TO_PERL/perl
use DBI;
use strict;
##use DBD::Oracle qw(:ora_types);
BEGIN
{
$ENV{'ORACLE_SID'}='...';
$ENV{'ORACLE_USERID'}='...';
$ENV{'PATH'}='/usr/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/ccs/bin';
$ENV{"LD_LIBRARY_PATH"}="/u01/app/oracle/product/8.1.7/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/local/lib";
$ENV{"ORACLE_HOME"}="/u01/app/oracle/product/8.1.7";
$ENV{"ORACLE_LIB"}="/u01/app/oracle/product/8.1.7/lib";
};

use DBD::Oracle qw(:ora_types);
my $XML_HEADER;
my $XML_FOOTER;

....................................


The file libmm.so.11 is present in the /usr/local/lib directory. If i
set the LD_LIBRARY_PATH from the shell the script works fine but if i
try to set the LD_LIBRARY_PATH in the BEGIN block it throws the about
mentioned error. What could be the possible reasons for this?

Please help

Gechu.

.



Relevant Pages

  • Re: detect shell script language
    ... In the 'old' days, when a user typed in a command, the interactive shell would immediately pass it off to 'exec' to execute. ... So, on return from exec with an error status, the shell would fork a copy of itself to try and run the script. ... As a result of the above, it was hard to tell whether the script was a Bourne shell or C shell, so the convention was introduced of using the Bourne shell no op command, as the first line in a Bourne shell script. ...
    (Debian-User)
  • Re: Call for input on comp.unix.shell FAQ
    ... >> questions and just tell people to FAQ it. ... The other level is how to write shell scripts. ... How can I remove whitespace characters within file names? ... Why one shouldn't use "echo" in a script? ...
    (comp.unix.shell)
  • SHELLdorado Newsletter 1/2003 - July 6th, 2003
    ... The "SHELLdorado Newsletter" covers UNIX shell script related ...
    (comp.unix.admin)
  • SHELLdorado Newsletter 1/2003 - July 6th, 2003
    ... The "SHELLdorado Newsletter" covers UNIX shell script related ...
    (comp.unix.questions)
  • SHELLdorado Newsletter 1/2003 - July 6th, 2003
    ... The "SHELLdorado Newsletter" covers UNIX shell script related ...
    (comp.unix.shell)