arvind_hotdog has asked for the wisdom of the Perl Monks concerning the following question:
## End of Script When i run the above script i get the following error. Can't load '/opt/oracle/app/oracle/product/10g/perl/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /opt/oracle/app/oracle/product/10g/perl/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at sample_test.pl line 45 Can anyone guide me through what might be potential problem causing this issue. Im kind of struck with this for couple of days and deadline is approaching. Thanks in advance for your replies. Hi, I have updated the thread. Sorry for the inconvenience cause and adding a few more details to the thread , the connectivity thing used in the code, i got it as a plug in from one of the sites http://www.orafaq.com/wiki/Perl When i made use of the following line in pluginmy $ORACLE_HOME = "/opt/oracle/app/oracle/product/10g"; my $ORACLE_SID1="DBHOSTNAME"; my $TGT_USER="USER1"; my $TGT_PASS="PASSWORD"; $ENV{ORACLE_HOME}=$ORACLE_HOME; $ENV{PATH}="$ORACLE_HOME/bin:/usr/sbin"; #$ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib32"; #$ENV{CLASSPATH}="$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbm +s/jlib"; BEGIN { die "ORACLE_HOME not set\n" unless $ENV{ORACLE_HOME}; unless ($ENV{OrAcLePeRl}) { $ENV{OrAcLePeRl} = "$ENV{ORACLE_HOME}/perl"; $ENV{PERL5LIB} = "$ENV{PERL5LIB}:$ENV{OrAcLePeRl}/lib:$ENV{OrAc +LePeRl}/lib/site_perl"; $ENV{LD_LIBRARY_PATH} = "$ENV{ORACLE_HOME}/lib32"; exec "$ENV{OrAcLePeRl}/bin/perl", $0, @ARGV; } } use strict; use warnings; use DBI; my $sql; my $sth; my $sql_ins; my $sql_del; my $sql_upd; my $sql_com; my $sth_ins; my $sth_del; my $sth_upd; my $sth_com; my $dbh_src; my $dbh_tgt; my $count_of_rev; #---------------------------------------- common initialization block +- end ----------------------# print "Variable initialization block executed\n"; #---------------------------------------- Get Account id - Start ----- +-----------------# my $sh_name=$ARGV[0]; my @acc_row; $ENV{ORACLE_SID}=$ORACLE_SID1; $dbh_tgt = DBI->connect("dbi:Oracle:$ENV{ORACLE_SID}", $TGT_USER, $TGT +_PASS) or die; print "Connection Successfull\n"; $dbh_tgt->disconnect;
was causing me the following issue, wrong ELF class: ELFCLASS64 so i had to change he code $ENV{LD_LIBRARY_PATH} = "$ENV{ORACLE_HOME}/lib32"; As per suggestion given in one of the sites$ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:$ENV{ORACLE_HOME}/lib3 +2:$ENV{ORACLE_HOME}/lib";
But still the other two erorrs are persisting...export LD_LIBRARY_PATH=$ORACLE_HOME/lib Update: If you get an ELFCLASS64 error, try setting LD_LIBRARY_PATH to + $ORACLE_HOME/lib32 instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl - Oracle Connectivity
by Tux (Canon) on Jun 24, 2013 at 10:36 UTC | |
|
Re: Perl - Oracle Connectivity
by marto (Cardinal) on Jun 24, 2013 at 10:44 UTC | |
|
Re: Perl - Oracle Connectivity
by locked_user sundialsvc4 (Abbot) on Jun 24, 2013 at 13:08 UTC | |
by arvind_hotdog (Initiate) on Jun 25, 2013 at 06:56 UTC | |
by Tux (Canon) on Jun 25, 2013 at 09:34 UTC | |
by arvind_hotdog (Initiate) on Jun 25, 2013 at 16:02 UTC | |
by Tux (Canon) on Jun 25, 2013 at 16:08 UTC | |
|
Re: Perl - Oracle Connectivity
by prashantktyagi (Scribe) on Jun 24, 2013 at 10:38 UTC |