Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file

I'm able to do a snmpget/snmpwalk and check_snmp through command line. But, when I do it through Nagios (creating a host & services entry in the config files), I see this error in the "Status Information" of the services under specific host:

External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file: No such file or directory

OS: SLES 11

like image 205
Enigma Avatar asked Dec 06 '25 18:12

Enigma


1 Answers

The below procedure is helpful, if libnetsnmp.so.XX is in your system.

First search for library libnetsnmp.so.XX

sudo find / -name libnetsnmp.so*

So you will get output like below

/usr/lib/libnetsnmp.so.30
/usr/lib/libnetsnmp.so.15
/usr/lib/libnetsnmp.so.15.1.2
/usr/local/lib/libnetsnmp.so.30
/usr/local/lib/libnetsnmp.so
/usr/local/lib/libnetsnmp.so.30.0.2
/usr/local/lib/libnetsnmp.so.20
...

Now link that libnetsnmp.so.XX to /usr/lib/

sudo ln -s /usr/local/lib/libnetsnmp.so.XX /usr/lib/libnetsnmp.so.XX
like image 92
gangadhars Avatar answered Dec 08 '25 14:12

gangadhars



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!