Can't locate Net/SNMP.pm in @INC
-
- Posts: 19
- Joined: Tue Jun 05, 2018 6:48 am
Can't locate Net/SNMP.pm in @INC
I have again faced same issue.
I want to use ./check_snmp_cisco_bgp.pl to check BGP status on router but while executing this command getting below error again.
Can't locate Net/SNMP.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_snmp_cisco_bgp.pl line 45.
BEGIN failed--compilation aborted at ./check_snmp_cisco_bgp.pl line 45.
dont know whats the issue
I want to use ./check_snmp_cisco_bgp.pl to check BGP status on router but while executing this command getting below error again.
Can't locate Net/SNMP.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_snmp_cisco_bgp.pl line 45.
BEGIN failed--compilation aborted at ./check_snmp_cisco_bgp.pl line 45.
dont know whats the issue
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't locate Net/SNMP.pm in @INC
What OS are you running?
You likely need to add the Net::SNMP perl package
for CentOS / RHEL
You likely need to add the Net::SNMP perl package
for CentOS / RHEL
Code: Select all
yum install 'perl(Net::SNMP)'
-
- Posts: 19
- Joined: Tue Jun 05, 2018 6:48 am
Re: Can't locate Net/SNMP.pm in @INC
Thank you for your reply.
while executing given command gives below error :- sudo yum install 'perl(Net::SNMP)'
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
https://yum.oracle.com/repo/OracleLinux ... repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'yum.oracle.com'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: public_ol6_UEKR4. Please verify its path and try again
We are using below linux
Oracle Linux Server release 6.10
Also like to add one point here below package is already installed
sudo yum install net-snmp-perl*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Package 1:net-snmp-perl-5.5-60.0.1.el6.x86_64 already installed and latest version
Nothing to do
while executing given command gives below error :- sudo yum install 'perl(Net::SNMP)'
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
https://yum.oracle.com/repo/OracleLinux ... repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'yum.oracle.com'"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: public_ol6_UEKR4. Please verify its path and try again
We are using below linux
Oracle Linux Server release 6.10
Also like to add one point here below package is already installed
sudo yum install net-snmp-perl*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Package 1:net-snmp-perl-5.5-60.0.1.el6.x86_64 already installed and latest version
Nothing to do
Last edited by bhaskarbabar on Wed Sep 19, 2018 4:16 pm, edited 1 time in total.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't locate Net/SNMP.pm in @INC
Is this server behind a proxy?
If so you likely need to configure your proxy setting for yum
https://support.nagios.com/kb/article.php?id=147
If so you likely need to configure your proxy setting for yum
https://support.nagios.com/kb/article.php?id=147
-
- Posts: 19
- Joined: Tue Jun 05, 2018 6:48 am
Re: Can't locate Net/SNMP.pm in @INC
Sorry but we dont have proxy server access.
we can download any package needed on PC and Upload via Winscp.
we can download any package needed on PC and Upload via Winscp.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
-
- Posts: 19
- Joined: Tue Jun 05, 2018 6:48 am
Re: Can't locate Net/SNMP.pm in @INC
Have tried installing epel-release-latest-7.noarch.rpm but still getting error
sudo yum install epel-release-latest-7.noarch.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
epel-release-latest-7.noarch.rpm: does not update installed package.
Error: Nothing to do
sudo yum install epel-release-latest-7.noarch.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
epel-release-latest-7.noarch.rpm: does not update installed package.
Error: Nothing to do
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't locate Net/SNMP.pm in @INC
you need to with this command
Code: Select all
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-
- Posts: 19
- Joined: Tue Jun 05, 2018 6:48 am
Re: Can't locate Net/SNMP.pm in @INC
yum install https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
Given command doesn't work as i dont have proxy access.
sudo yum install https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Cannot open: https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm. Skipping.
Error: Nothing to do
Given command doesn't work as i dont have proxy access.
sudo yum install https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Cannot open: https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm. Skipping.
Error: Nothing to do
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't locate Net/SNMP.pm in @INC
If you don't have proxy access and don't have direct access to the internet, installing epel repository will not help then.
You are going to need to find a way to get the required perl-Net-SNMP package and all it's dependencies on the server.
You are going to need to find a way to get the required perl-Net-SNMP package and all it's dependencies on the server.