Can't locate Log/Dispatch.pm in @INC

Posted 运维的自我修养

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Can't locate Log/Dispatch.pm in @INC相关的知识,希望对你有一定的参考价值。

记录一下配置mha的时候遇到的错误,使用perl模块发送邮件的时候报以下错误:

#  masterha_check_ssh --conf=/data/mha/app1.cnf
Can‘t locate Log/Dispatch.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 /usr/local/share/perl5/MHA/SSHCheck.pm line 29.
BEGIN failed--compilation aborted at /usr/local/share/perl5/MHA/SSHCheck.pm line 29.
Compilation failed in require at /usr/local/bin/masterha_check_ssh line 25.
BEGIN failed--compilation aborted at /usr/local/bin/masterha_check_ssh line 25.

  

解决方法:

yum install perl-Mail-Sender
yum install perl-Log-Dispatch

 

以上是关于Can't locate Log/Dispatch.pm in @INC的主要内容,如果未能解决你的问题,请参考以下文章

Solve Perl Can't locate getopts.pl

lnmp升级nginx引起的 nginx:Can't locate nginx.pm 错误

Can't locate Log/Dispatch.pm in @INC

hbase.client.RetriesExhaustedException: Can't get the locations hive关联Hbase查询报错

python INFO: Can't locate Tcl/Tk libs and/or headers

学员问Can't locate DBD/SQLite.pm in @INC 怎么解决?