473,587 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to fix "can't load oracle.so" error for script using Oracle DB?

2 New Member
Hi everyone.

I want to create a crawler with perl and run it on crowntab. The program should use DBI and DBD::Oracle to insert data into my database.

When crontab runs it, I get the following error in my mail box.

Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-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 /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Dynaloader.pm line 230.

my code is something like:
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl 
  2.  
  3. use Getopt::Long; 
  4. use POSIX; 
  5. use POSIX qw(setsid); 
  6. use warnings; 
  7. use Data::Dumper; 
  8. use WWW::Mechanize; 
  9. use DBI; 
  10. use DBD::Oracle; 
  11. use XML::Twig; 
  12.  
  13. init_env(); 
  14.  
  15. #do something----- 
  16.  
  17. sub init_env 
  18.     $SIG{'INT'}  = 'IGNORE'; 
  19.     $SIG{'QUIT'} = 'IGNORE'; 
  20.     $SIG{'TERM'} = 'IGNORE'; 
  21.     $SIG{'PIPE'} = 'IGNORE'; 
  22.     # signal(SIGPIPE, SIG_IGN); 
  23.     $SIG{'CHLD'} = 'IGNORE'; 
  24.  
  25.     my $pid = fork(); die "$!" unless defined $pid; exit 4 if $pid; 
  26.  
  27.  
  28.     POSIX::setsid() or die "Can't start a new session: $!"; 
  29.  
  30.     # Flush standard output buffer. 
  31.     select(STDOUT); 
  32.     $| = 1; 
  33.  
  34.  
  35. BEGIN 
  36.         $ENV{ORACLE_HOME} = "/u01/oracle/product/10.2.0/client_1"; 
  37.         $ENV{PATH} = "/bin:/usr/bin:/u01/oracle/product/10.2.0/client_1/bin:/home/appowner/bin:."; 
  38.         $ENV{LD_LIBRARY_PATH} = "/u01/oracle/product/10.2.0/client_1/lib"; 
  39.  
  40. END { 
  41.  
  42.  }
  43.  
  44.  
I have installed both DBI and DBD::Oracle with CPAN.

Please help and many thanks.

Shen
Jan 26 '11 #1
2 6812
William Shen
2 New Member
Hey I have figured out there is something wrong with my DBD installation, I corrected it and it run fine when I do it manually on command line, but still getting same error when crontab calls it. I read it on some other site that people suggest to set LD_LIBRARY_PATH to point to where the shared library is. But as you can see, I have set it to the location where "libclntsh.so.1 0.1" is located. =(
Jan 27 '11 #2
chorny
80 Recognized Expert New Member
Did you try setting LD_LIBRARY_PATH to both directories, colon-separated?
Jan 28 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3907
by: Vicky | last post by:
Hi, Here it the test perl code to connect to my Sybase database server.... ******************************** use CGI; use DBI; # Connect to database. my $My_dbh =
1
8451
by: rawii | last post by:
I am running on a Sun box and am trying to install the perl tools to connect to Oracle. When I try to install the DBD::Oracle module, I get the following. Please help.. What does is mean and how can I fix it? 33% make Skip blib/lib/DBD/Oracle.pm (unchanged) Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged) Skip...
0
3253
by: Axel Dachtler | last post by:
Hi, I have downloaded both CPAN-moduls DBD-Oracle-1.14.tar and DBI-1.39.tar. But I fail in installing these moduls! The Perl Package Manager (PPM) returns this error message: no valid repositories ... when I execute install DBI-1.39.tar !!!
0
4654
by: Piotr B. | last post by:
Hello, I want to make use of a Perl script "ora2pg" (Oracle to PostgreSQL schema converter), which requires the following modules: DBI, DBD::Oracle and DBD::Pg. As I don't use Perl on a regular basis, I've downloaded and installed ActivePerl 5.6.1.638 (Windows). Then, I installed DBI and DBD::Oracle using the PPM utility. But,...
3
6812
by: hakiran | last post by:
Hello all, I have been using Perl DBI the last 6months or so. I use it extensively with MySQL. But recently i tried to access Oracle DB with it and was having trouble. Any help would be appreciated. Here is the code and the error i get. I know the table/view do exist. Thanks all Kiran ----------
1
2058
by: jrefran | last post by:
Hi everyone! I have problem on my DBD:Oracle installation from source code. Does anyone familiar with this kind of error. Please help! I'm completely new with this kind of work item. This is the error during execution of "make". This error was in the last part. ----------------------------------...
9
4295
by: mdshafi01 | last post by:
Hello All, I have problem in installing DBD::ORACLE package. Please can any one have experience in installing DBD::ORACLE package. please give me some hints to install this DBD::ORACLE packages. shafi
1
5511
by: srikantvm | last post by:
Hi All, I am using perl, v5.8.8 built for MSWin32-x86-multi-thread and i tried installing the DBD-Oracle module but unable to install. Please find below the steps followed by me: 1) I first tried installing Oracle.pm using the Activestate PPM but, i got an connection error to the activestate perl module repository. 2) Then i tried...
3
2799
by: OracletoPerl | last post by:
hi to all can anyone help me out in getting DBD::Oracle for windows.. i am currently using oracle 9i and active perl state 5.8.8..
17
5938
by: kanishka1213 | last post by:
when i run perl script in the cmd prompt , it runs well and outputs results from db. but when i run the same script on apache server internet explorer. i get an error as ----- install_driver(Oracle) failed: Can't load 'C:/perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.