Perl DBI返回install_driver(Oracle)失败

时间:2014-12-06 07:16:41

标签: oracle perl

当我使用Padre IDE将Perl脚本编写为

时,我遇到了问题
#!/usr/bin/perl
use DBI;

my $dbh = DBI->connect('dbi:Oracle:host=localhost;sid=orcl;port=1521', 'user', 'password', { RaiseError => 1, AutoCommit => 0 });

它引发了这个错误

*install_driver(Oracle) failed: Can't locate loadable object for module DBD::Oracle in @INC (@INC contains:D:/Dwimperl/perl/site/lib D:/Dwimperl/perl/vendor/libD:/Dwimperl/perl/lib .) at (eval 54) line 3
Compilation failed in require at (eval 54) line 3.
Perhaps a module that DBD::Oracle requires hasn't been fully installedat test.pl line 19*

但如果我在命令中手动运行两行Perl脚本,它就会成功运行。

1 个答案:

答案 0 :(得分:0)

尝试安装此版本的Strawberry Perl,现在随附DBD :: Oracle。

http://strawberryperl.com/release-notes/5.20.0.1-64bit.html

请务必阅读本网站上有关Oracle客户端和PATH设置的说明。

HTH