尝试在 8.3-RELEASE-p3 上运行 Nagios 插件时,出现错误:
Missing perl modules: Net::SMTP::SSL
我已经重建了 p5-Net-SMTP-SSL 和 perl5.16 的端口。cpan -i Net::SMTP::SSL
报告
Net::SMTP::SSL is up to date (1.01).
该插件在 shebang 中调用 /usr/bin/perl(根据我的路径是正确的),并通过以下方式调用模块
push @required_module, 'Net::SMTP::SSL' if $ssl;
我还应该关注什么?
答案1
根据 larsks 的评论,运行/usr/bin/perl -MNet::SMTP::SSL -e exit
后一次出现了几个其他缺失的模块:
# /usr/bin/perl -MNet::SMTP::SSL -e exitCan't locate Net/SSLeay.pm in @INC (@INC contains: /usr/local/lib/perl5/5.16/BSDPAN /usr/local/lib/perl5/site_perl/5.16/mach /usr/local/lib/perl5/site_perl/5.16 /usr/local/lib/perl5/5.16/mach /usr/local/lib/perl5/5.16 .) at /usr/local/lib/perl5/site_perl/5.16/IO/Socket/SSL.pm line 17.BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.16/IO/Socket/SSL.pm line 17.Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/Net/SMTP/SSL.pm line 8.BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.16/Net/SMTP/SSL.pm line 8.
Compilation failed in require.
BEGIN failed--compilation aborted.
安装 p5-IO-Socket-SSL 和 p5-Net-SSLeay 解决了该问题。