perl – 找不到DBI.pm

前端之家收集整理的这篇文章主要介绍了perl – 找不到DBI.pm前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试启动这个脚本:
#!/usr/bin/perl 

use DBI;

my $dbh = DBI->connect( 'dbi:Oracle:host=lonlin2;sid=TIMFX1AD;port=1524','xbsesdbo','xbsesdbo123' )  || die ( $DBI::errstr . "\n" );

my $query= "SELECT * FROM product_elements WHERE element_id = 1001";
my $queryHandler= $dbh->prepare($query);

my $result= $queryHandler->execute();


open(fileHandler,"> note.txt");

print fileHandler "Risultato query: $result\n";

my $e= $dbh->disconnect();
close(fileHandler);

当我启动这个脚本我收到这个错误:@H_502_5@

Can’t locate DBI.pm in @INC (@INC contains: /opt/perl_32/lib/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/5.8.3 /opt/perl_32/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/site_perl/5.8.3 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/vendor_perl/5.8.3 /opt/perl_32/lib/vendor_perl .) at ./prova.pl line 3.@H_502_5@

我已经安装好了!安装了DBI.pm!@H_502_5@

解决方法

如果您在控制台中有root类型(Debian / Ubuntu):
sudo apt-get install libdbi-perl
原文链接:https://www.f2er.com/Perl/171496.html

猜你在找的Perl相关文章