@INC路径中的Perl模块,但现在无法定位。找到其他模块

时间:2015-02-11 16:15:35

标签: perl module path

正在找到Perl模块DBD :: mysql,现在不是。我收到了错误消息。

Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /mnt/Lab/Data/IonTorrent/plugins/WH_v2_05/scripts/create_blinded_reports.pl line 13. BEGIN failed--compilation aborted at /mnt/Lab/Data/IonTorrent/plugins/WH_v2_05/scripts/create_blinded_reports.pl line 13.

我看了看模块的位置。

$ perldoc -l DBD::mysql
/usr/lib64/perl5/DBD/mysql.pm

路径/ usr / lib64 / perl5就在那里,为什么它找不到它。

这是代码。

#!/usr/bin/perl -w 


use strict;
use DBI;
use DBD::mysql; #<----- this is the line that error (I eliminated the header, this is actually line 13.)
use File::Slurp;
use Data::Dumper;

my ($server,$run)=@ARGV;

## variables
my $wh_report="/mnt/Lab/Data/IonTorrent/$server/$run/4_report/wh_report_".$run.".txt";

**我还检查过我在正确的服务器上。

它编译也很好。

perl -c create_blinded_reports.pl
create_blinded_reports.pl syntax OK

1 个答案:

答案 0 :(得分:1)

我从代码中删除use DBD::mysql;并且运行正常。谢谢!