While trying to use a Nagios plugin I got an error saying that “Can’t locate utils.pm in @INC”.

Following is complete error:

Can’t locate utils.pm in @INC (@INC contains: /root /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .)

This issue is occurred due wrong library path in Nagios Plugin(Perl Script).

When I checked library path in script its given as ‘use lib “/usr/local/nagios/libexec”;’ where path /usr/local/nagios/libexec is not exists in our os.

All our library’s are available in path “/usr/lib/nagios/plugins”, so I changed lib path in my script to “/usr/lib/nagios/plugins”. After changing the path Nagios Plugin is worked without any issue.

参考:

https://viewsby.wordpress.com/2014/02/20/perlnagios-cant-locate-utils-pm-in-inc/

最新文章

  1. 【Codeforces717F】Heroes of Making Magic III 线段树 + 找规律
  2. 转:PostgreSQL Cheat Sheet
  3. JAVA06数组之动手动脑问题解决
  4. Python从线程获取函数返回值
  5. SilverIight数据绑定实例
  6. 第一节Unity3D简介
  7. [LeetCode]题解(python):101 Symmetric tree
  8. .net变量判断
  9. 委托(C# 编程指南)
  10. Linux命令-tar
  11. MVC用户登录方法(lamda表达式)
  12. Stripies(POJ 1862 贪心)
  13. spring常规任务(轻便易)
  14. android动画介绍--Animation 实现loading动画效果
  15. BZOJ2662 [BeiJing wc2012]冻结
  16. Oracle SQL优化原则
  17. MySQL的nnodb引擎表数据分区存储
  18. SQL 中常用存储过程xp_cmdshell运行cmd命令 (转载)
  19. 如何调试bash脚本
  20. 查看Ubuntu的版本和系统版本

热门文章

  1. eclipse创建maven管理Spark的scala
  2. leetcode Online Judge 150题 解答分析之一 Reverse Words in a String
  3. windows下Python shell代码自动补全
  4. iOS UITextField限制输入数字
  5. linux编译c文件
  6. shell脚本入门及基本元素
  7. Cosh.1
  8. codeforces 732E(贪心)
  9. MVC 架构
  10. C#串口通讯实例