您好我在我的腳本中使用DBD :: Oracle來查詢到oracle數據庫。當我運行此腳本其工作正常,但是當我計劃從cron運行此其得到下述錯誤dbi ::從cron運行時出現Oracle錯誤
install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libnnz10.so: 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.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /scripts/db/dbquery.pl line 50
50號線:
my $dbh = DBI->connect("dbi:Oracle:$tns","$dbuser","$dbpass");
請建議,如何解決這個問題。
Perl的5.8.5?如果可能的話,你應該考慮升級。 – Ether 2010-06-25 16:24:26
您不需要在'DBI-> connect()'中引用'$ dbuser'和'$ dbpass'參數 - 它們可能已經是字符串,並且在需要時會這樣。 – pilcrow 2010-06-25 18:16:45