我正在尝试安装munin-mysql 插件,但遇到了一个奇怪的错误。DBI.pm
Munin 抱怨它在@INC 中找不到:
[root@mybox perl5]# munin-run mysql
Can't locate DBI.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 /etc/munin/plugins/mysql line 127.
BEGIN failed--compilation aborted at /etc/munin/plugins/mysql line 127.
但是,它确实在路径中,并且恰好在/usr/local/lib64/perl5
. 它是通过命令安装的cpanm DBI
。事实上,有几个DBI.pm
文件;我怎么知道要使用哪一个?
[root@mybox perl5]# find / -name DBI.pm
/root/.cpan/build/DBI-1.634-Aazmvi/blib/lib/Bundle/DBI.pm
/root/.cpan/build/DBI-1.634-Aazmvi/blib/lib/DBI.pm
/root/.cpan/build/DBI-1.634-Aazmvi/lib/Bundle/DBI.pm
/root/.cpan/build/DBI-1.634-Aazmvi/DBI.pm
/root/.cpanm/work/1460983027.32244/DBI-1.634/blib/lib/Bundle/DBI.pm
/root/.cpanm/work/1460983027.32244/DBI-1.634/blib/lib/DBI.pm
/root/.cpanm/work/1460983027.32244/DBI-1.634/lib/Bundle/DBI.pm
/root/.cpanm/work/1460983027.32244/DBI-1.634/DBI.pm
/root/munin-mysql-master/t/mock/DBI.pm
/usr/local/lib64/perl5/Bundle/DBI.pm
/usr/local/lib64/perl5/DBI.pm
相关问题: