Trouble exporting LD_LIBRARY_PATH
Trouble exporting LD_LIBRARY_PATH
am 30.09.2005 04:49:52 von Shah
Setting: Perl 5.8.2 on Solaris 9
We need to set these 2 environment variables from Perl:
$ENV{DB2INSTANCE} = 'db2inst3';
$ENV{LD_LIBRARY_PATH} = '/export/home/db2inst3/sqllib/lib';
We even tried enclosing them in a BEGIN block, but we're getting:
install_driver(DB2) failed: Can't load
'/usr/iw-home/iw-perl/site/lib/auto/DBD/DB2/DB2.so' for module DBD:DB2:
ld.so.1: /usr/iw-home/iw-perl/bin/perl: fatal: libdb2.so.1: open failed: No
such file or directory at /usr/iw-home/iw-perl/lib/DynaLoader.pm line 229.
at (eval 6) line 3
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/iw-home/custom/lib/dbAccess.pm line 62
In dbAccess.pm. just before issuing DBI->connect, we've added some logging
information, which shows:
key: |LD_LIBRARY_PATH| value: |/export/home/db2inst3/sqllib/lib|
key: |DB2INSTANCE| value: |db2inst3|
Issuing LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib from the command
line results in the same error (at least some of the time), but the log
shows that LD_LIBRARY_PATH is correctly set.
However, issuing export LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib
from the command line and running our test script works every time. So how
do we export those environment variables from Perl?
Incidentally, last week the following was causing trouble:
$ENV{'DB2INSTANCE'} = 'db2inst3';
$ENV{'LD_LIBRARY_PATH'} = '/export/home/db2inst3/sqllib/lib';
Note the single-quotes on the left side. Removing them worked (last week).
But not today. Double-quotes or no quotes ain't making a difference.
Looks like things stopped working without any changes to the Perl code. The
PATH changed, I think, but setting it to nothing didn't help. Incidentally,
which binary should be referring to LD_LIBRARY_PATH and loading libdb2.so.1?
Although, why would simply exporting LD_LIBRARY_PATH from the command line
make our test script work?
Any ideas?
Thanks,
S.
Re: Trouble exporting LD_LIBRARY_PATH
am 30.09.2005 12:53:54 von perl
It seems that your DBD::DB2-installation does not work. Reinstall
DBD::DB2 via
perl -MCPAN -le "install DBD::DB2"
regards,
Renée
Am 30.09.2005 um 04:49 Uhr haben Sie geschrieben:
> Setting: Perl 5.8.2 on Solaris 9
>
> We need to set these 2 environment variables from Perl:
>
> $ENV{DB2INSTANCE} = 'db2inst3';
> $ENV{LD_LIBRARY_PATH} = '/export/home/db2inst3/sqllib/lib';
>
> We even tried enclosing them in a BEGIN block, but we're getting:
>
> install_driver(DB2) failed: Can't load
> '/usr/iw-home/iw-perl/site/lib/auto/DBD/DB2/DB2.so' for module
DBD:DB2:
> ld.so.1: /usr/iw-home/iw-perl/bin/perl: fatal: libdb2.so.1: open
failed: No
> such file or directory at /usr/iw-home/iw-perl/lib/DynaLoader.pm line
229.
> at (eval 6) line 3
> Compilation failed in require at (eval 6) line 3.
> Perhaps a required shared library or dll isn't installed where
expected
> at /usr/iw-home/custom/lib/dbAccess.pm line 62
>
> In dbAccess.pm. just before issuing DBI->connect, we've added some
logging
> information, which shows:
>
> key: |LD_LIBRARY_PATH| value: |/export/home/db2inst3/sqllib/lib|
> key: |DB2INSTANCE| value: |db2inst3|
>
> Issuing LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib from the
command
> line results in the same error (at least some of the time), but the
log
> shows that LD_LIBRARY_PATH is correctly set.
>
> However, issuing export
LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib
> from the command line and running our test script works every time. So
how
> do we export those environment variables from Perl?
>
> Incidentally, last week the following was causing trouble:
>
> $ENV{'DB2INSTANCE'} = 'db2inst3';
> $ENV{'LD_LIBRARY_PATH'} = '/export/home/db2inst3/sqllib/lib';
>
> Note the single-quotes on the left side. Removing them worked (last
week).
> But not today. Double-quotes or no quotes ain't making a difference.
>
> Looks like things stopped working without any changes to the Perl
code. The
> PATH changed, I think, but setting it to nothing didn't help.
Incidentally,
> which binary should be referring to LD_LIBRARY_PATH and loading
libdb2.so.1?
> Although, why would simply exporting LD_LIBRARY_PATH from the command
line
> make our test script work?
>
> Any ideas?
>
> Thanks,
>
> S.
>
>
>
>
RE: Trouble exporting LD_LIBRARY_PATH
am 30.09.2005 16:20:13 von Ron.Reidy
Your library path needs to include $ORACLE_HOME/lib at a minimum.
--
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: Shah [mailto:shah@zofan.com]=20
Sent: Thursday, September 29, 2005 8:50 PM
To: dbi-users@perl.org
Subject: Trouble exporting LD_LIBRARY_PATH
Setting: Perl 5.8.2 on Solaris 9
We need to set these 2 environment variables from Perl:
$ENV{DB2INSTANCE} =3D 'db2inst3';
$ENV{LD_LIBRARY_PATH} =3D '/export/home/db2inst3/sqllib/lib';
We even tried enclosing them in a BEGIN block, but we're getting:
install_driver(DB2) failed: Can't load=20
'/usr/iw-home/iw-perl/site/lib/auto/DBD/DB2/DB2.so' for module DBD:DB2:=20
ld.so.1: /usr/iw-home/iw-perl/bin/perl: fatal: libdb2.so.1: open failed:
No=20
such file or directory at /usr/iw-home/iw-perl/lib/DynaLoader.pm line
229. at (eval 6) line 3 Compilation failed in require at (eval 6) line
3. Perhaps a required shared library or dll isn't installed where
expected at /usr/iw-home/custom/lib/dbAccess.pm line 62
In dbAccess.pm. just before issuing DBI->connect, we've added some
logging=20
information, which shows:
key: |LD_LIBRARY_PATH| value: |/export/home/db2inst3/sqllib/lib|
key: |DB2INSTANCE| value: |db2inst3|
Issuing LD_LIBRARY_PATH=3D/export/home/db2inst3/sqllib/lib from the
command=20
line results in the same error (at least some of the time), but the log=20
shows that LD_LIBRARY_PATH is correctly set.
However, issuing export =
LD_LIBRARY_PATH=3D/export/home/db2inst3/sqllib/lib
from the command line and running our test script works every time. So
how=20
do we export those environment variables from Perl?
Incidentally, last week the following was causing trouble:
$ENV{'DB2INSTANCE'} =3D 'db2inst3';
$ENV{'LD_LIBRARY_PATH'} =3D '/export/home/db2inst3/sqllib/lib';
Note the single-quotes on the left side. Removing them worked (last
week).=20
But not today. Double-quotes or no quotes ain't making a difference.
Looks like things stopped working without any changes to the Perl code.
The=20
PATH changed, I think, but setting it to nothing didn't help.
Incidentally,=20
which binary should be referring to LD_LIBRARY_PATH and loading
libdb2.so.1?=20
Although, why would simply exporting LD_LIBRARY_PATH from the command
line=20
make our test script work?
Any ideas?
Thanks,
S.=20
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.
RE: Trouble exporting LD_LIBRARY_PATH
am 30.09.2005 16:22:20 von Ron.Reidy
Ignore this - It is way too early after a long night of patching and I
have Oracle on the brain.
My apologies.
-----Original Message-----
From: Reidy, Ron=20
Sent: Friday, September 30, 2005 8:20 AM
To: Shah; dbi-users@perl.org
Subject: RE: Trouble exporting LD_LIBRARY_PATH
Your library path needs to include $ORACLE_HOME/lib at a minimum.
--
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: Shah [mailto:shah@zofan.com]=20
Sent: Thursday, September 29, 2005 8:50 PM
To: dbi-users@perl.org
Subject: Trouble exporting LD_LIBRARY_PATH
Setting: Perl 5.8.2 on Solaris 9
We need to set these 2 environment variables from Perl:
$ENV{DB2INSTANCE} =3D 'db2inst3';
$ENV{LD_LIBRARY_PATH} =3D '/export/home/db2inst3/sqllib/lib';
We even tried enclosing them in a BEGIN block, but we're getting:
install_driver(DB2) failed: Can't load=20
'/usr/iw-home/iw-perl/site/lib/auto/DBD/DB2/DB2.so' for module DBD:DB2:=20
ld.so.1: /usr/iw-home/iw-perl/bin/perl: fatal: libdb2.so.1: open failed:
No=20
such file or directory at /usr/iw-home/iw-perl/lib/DynaLoader.pm line
229. at (eval 6) line 3 Compilation failed in require at (eval 6) line
3. Perhaps a required shared library or dll isn't installed where
expected at /usr/iw-home/custom/lib/dbAccess.pm line 62
In dbAccess.pm. just before issuing DBI->connect, we've added some
logging=20
information, which shows:
key: |LD_LIBRARY_PATH| value: |/export/home/db2inst3/sqllib/lib|
key: |DB2INSTANCE| value: |db2inst3|
Issuing LD_LIBRARY_PATH=3D/export/home/db2inst3/sqllib/lib from the
command=20
line results in the same error (at least some of the time), but the log=20
shows that LD_LIBRARY_PATH is correctly set.
However, issuing export =
LD_LIBRARY_PATH=3D/export/home/db2inst3/sqllib/lib
from the command line and running our test script works every time. So
how=20
do we export those environment variables from Perl?
Incidentally, last week the following was causing trouble:
$ENV{'DB2INSTANCE'} =3D 'db2inst3';
$ENV{'LD_LIBRARY_PATH'} =3D '/export/home/db2inst3/sqllib/lib';
Note the single-quotes on the left side. Removing them worked (last
week).=20
But not today. Double-quotes or no quotes ain't making a difference.
Looks like things stopped working without any changes to the Perl code.
The=20
PATH changed, I think, but setting it to nothing didn't help.
Incidentally,=20
which binary should be referring to LD_LIBRARY_PATH and loading
libdb2.so.1?=20
Although, why would simply exporting LD_LIBRARY_PATH from the command
line=20
make our test script work?
Any ideas?
Thanks,
S.=20
This electronic message transmission is a PRIVATE communication which
contains information which may be confidential or privileged. The
information is intended=20
to be for the use of the individual or entity named above. If you are
not the=20
intended recipient, please be aware that any disclosure, copying,
distribution=20
or use of the contents of this information is prohibited. Please notify
the sender of the delivery error by replying to this message, or notify
us by telephone (877-633-2436, ext. 0), and then delete it from your
system.
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.
Re: Trouble exporting LD_LIBRARY_PATH
am 30.09.2005 17:19:38 von Tim.Bunce
On Thu, Sep 29, 2005 at 07:49:52PM -0700, Shah wrote:
> Setting: Perl 5.8.2 on Solaris 9
>
> We need to set these 2 environment variables from Perl:
>
> $ENV{DB2INSTANCE} = 'db2inst3';
> $ENV{LD_LIBRARY_PATH} = '/export/home/db2inst3/sqllib/lib';
>
> We even tried enclosing them in a BEGIN block, but we're getting:
LD_LIBRARY_PATH needs to be set before the process starts.
Tim.
> install_driver(DB2) failed: Can't load
> '/usr/iw-home/iw-perl/site/lib/auto/DBD/DB2/DB2.so' for module DBD:DB2:
> ld.so.1: /usr/iw-home/iw-perl/bin/perl: fatal: libdb2.so.1: open failed: No
> such file or directory at /usr/iw-home/iw-perl/lib/DynaLoader.pm line 229.
> at (eval 6) line 3
> Compilation failed in require at (eval 6) line 3.
> Perhaps a required shared library or dll isn't installed where expected
> at /usr/iw-home/custom/lib/dbAccess.pm line 62
>
> In dbAccess.pm. just before issuing DBI->connect, we've added some logging
> information, which shows:
>
> key: |LD_LIBRARY_PATH| value: |/export/home/db2inst3/sqllib/lib|
> key: |DB2INSTANCE| value: |db2inst3|
>
> Issuing LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib from the command
> line results in the same error (at least some of the time), but the log
> shows that LD_LIBRARY_PATH is correctly set.
>
> However, issuing export LD_LIBRARY_PATH=/export/home/db2inst3/sqllib/lib
> from the command line and running our test script works every time. So how
> do we export those environment variables from Perl?
>
> Incidentally, last week the following was causing trouble:
>
> $ENV{'DB2INSTANCE'} = 'db2inst3';
> $ENV{'LD_LIBRARY_PATH'} = '/export/home/db2inst3/sqllib/lib';
>
> Note the single-quotes on the left side. Removing them worked (last week).
> But not today. Double-quotes or no quotes ain't making a difference.
>
> Looks like things stopped working without any changes to the Perl code. The
> PATH changed, I think, but setting it to nothing didn't help. Incidentally,
> which binary should be referring to LD_LIBRARY_PATH and loading libdb2.so.1?
> Although, why would simply exporting LD_LIBRARY_PATH from the command line
> make our test script work?
>
> Any ideas?
>
> Thanks,
>
> S.
>
>