Page 1 of 2

Can't locate *.pm errors running serviice checks

Posted: Tue Jun 09, 2015 11:17 pm
by vhoover
I am trying to setup two different service checks. When trying to run the scripts I get the following error messages. I have come across this before, but I for the life of me remember how to resolve this situation.

Code: Select all

[root@nagiosxi libexec]# ./box293_check_vmware.pl --help
Can't locate Time/Piece.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 ./box293_check_vmware.pl line 448.
BEGIN failed--compilation aborted at ./box293_check_vmware.pl line 448.

[root@nagiosxi libexec]# ./check_hnas_health --help
Can't locate SNMP/Simple.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 ./check_hnas_health line 25.
BEGIN failed--compilation aborted at ./check_hnas_health line 25.

Re: Can't locate *.pm errors running serviice checks

Posted: Wed Jun 10, 2015 8:58 am
by lmiltchev
Try:

Code: Select all

yum install perl-Time-Piece perl-SNMP-Simple -y

Re: Can't locate *.pm errors running serviice checks

Posted: Wed Jun 10, 2015 5:24 pm
by vhoover
Do you know a different resolution in running that I get the following, I even get it when doing a "yum update". When I did a search for SNMP-Simple.pm I did find results on the system for it.

Code: Select all

[root@nagiosxi ~]# yum install perl-Time-Piece perl-SNMP-Simple -y
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: mirror.steadfast.net
 * extras: mirror.steadfast.net
 * rpmforge: mirror.chpc.utah.edu
 * updates: mirror.raystedman.net
http://ppa.launchpad.net/nagiosinc/ppa/ubuntu/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ppa.launchpad.net_nagiosinc_ppa_ubuntu. Please verify its path and try again

Re: Can't locate *.pm errors running serviice checks

Posted: Wed Jun 10, 2015 6:28 pm
by Box293
What happens when you search for it?

Code: Select all

yum search SNMP-Simple
Can you show us the output from this command:

Code: Select all

yum repolist

Re: Can't locate *.pm errors running serviice checks

Posted: Wed Jun 10, 2015 10:57 pm
by vhoover
When running the two commands, I get the following results:

Code: Select all

[root@nagiosxi ~]# yum search SNMP-Simple
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: mirror.steadfast.net
 * extras: mirror.steadfast.net
 * rpmforge: mirror.chpc.utah.edu
 * updates: mirror.raystedman.net
http://ppa.launchpad.net/nagiosinc/ppa/ubuntu/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ppa.launchpad.net_nagiosinc_ppa_ubuntu. Please verify its path and try again
[root@nagiosxi ~]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: mirror.steadfast.net
 * extras: mirror.steadfast.net
 * rpmforge: mirror.chpc.utah.edu
 * updates: mirror.raystedman.net
http://ppa.launchpad.net/nagiosinc/ppa/ubuntu/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
repo id                                repo name                          status
base                                   CentOS-6 - Base                     6,518
cr                                     CentOS-6 - CR                           0
epel                                   Extra Packages for Enterprise Linu 11,626
extras                                 CentOS-6 - Extras                      38
nagios-base                            Nagios                                151
nagiosxi-deps                          Nagios XI Dependencies                 28
ppa.launchpad.net_nagiosinc_ppa_ubuntu added from: http://ppa.launchpad.n      0
rpmforge                               RHEL 6 - RPMforge.net - dag             0
updates                                CentOS-6 - Updates                      0
repolist: 18,361

Re: Can't locate *.pm errors running serviice checks

Posted: Thu Jun 11, 2015 8:56 am
by ssax
Usually this means there is a proxy that is denying it, if you have one, have you configured yum for your proxy?

https://www.centos.org/docs/5/html/yum/ ... erver.html

Re: Can't locate *.pm errors running serviice checks

Posted: Fri Jun 12, 2015 1:59 am
by vhoover
No there is no Proxy Server in play on the network.

Re: Can't locate *.pm errors running serviice checks

Posted: Fri Jun 12, 2015 6:45 am
by lmiltchev
You are having issues with one of your repos. Fix the URL for the "ubuntu" repo (or remove it), then try again running:

Code: Select all

yum install perl-Time-Piece perl-SNMP-Simple -y
# yum provides perl-Time-Piece perl-SNMP-Simple
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sanctuaryhost.com
* epel: mirror.steadfast.net
* extras: mirrors.cmich.edu
* rpmforge: mirror.team-cymru.org
* updates: mirror.netdepot.com
perl-Time-Piece-1.15-136.el6.x86_64 : Time objects from localtime and gmtime
Repo : base
Matched from:



perl-Time-Piece-1.15-136.el6_6.1.x86_64 : Time objects from localtime and gmtime
Repo : updates
Matched from:



perl-SNMP-Simple-0.02-2.el6.noarch : Shortcuts for SNMP
Repo : epel
Matched from:



perl-SNMP-Simple-0.02-1.2.el6.rf.noarch : Shortcuts for SNMP
Repo : rpmforge
Matched from:



perl-Time-Piece-1.15-136.el6_6.1.x86_64 : Time objects from localtime and gmtime
Repo : installed
Matched from:
Other : Provides-match: perl-Time-Piece



perl-SNMP-Simple-0.02-2.el6.noarch : Shortcuts for SNMP
Repo : installed
Matched from:
Other : Provides-match: perl-SNMP-Simple

Re: Can't locate *.pm errors running serviice checks

Posted: Fri Jun 12, 2015 6:50 am
by vhoover
It has been a long time since dealing with repo's, could you refresh my memory with the steps to fix and remove it.

Re: Can't locate *.pm errors running serviice checks

Posted: Fri Jun 12, 2015 9:06 am
by lmiltchev
The repo file should be listed in "/etc/yum.repos.d/" directory. Delete it or move the file to "/tmp" for the time being and see if you can run:

Code: Select all

yum clean all
yum update


If this works, try installing the missing packages.