Perl模块DBD :: mysql被发现,现在不是。我收到错误消息。@INC路径中的Perl模块,但无法找到它。其他模块被发现
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)[email protected];
## 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
你真的需要加载'DBD :: mysql'吗?加载'DBI'应该足够了。 – TLP 2015-02-11 16:18:19
我不知道。让我试试吧....目前正在测试 – user1807271 2015-02-11 16:19:10
当你调用connect()时,你不会/ DBI在解析'mysql'出DSN字符串时加载它。 – 2015-02-11 16:54:21