Net-snmp 5.7.3 sub-agent libnetsnmp. so.30 not found solution, net-snmp5.7.3
The error "./mysnmp: error while loading shared libraries: libnetsnmpmibs. so.30: cannot open shared object file: No such file or directory" is reported when the sub-agent developed by the net-snmp-5.7.3 is executed"
The reason is that the environment variable LD_LIBRARY_PATH is not defined. Execute the following statement:
export LD_LIBRARY_PATH = /usr/local/lib
Solution example:
root@map:/usr/local/lib# ldd /home/kpiss/net-snmp-5.7.3/agent/mibgroup/chanctsnmp linux-vdso.so.1 => (0x00007fff577e2000) libnetsnmpmibs.so.30 => not found libnetsnmpagent.so.30 => not found libnetsnmp.so.30 => not found libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc5207a7000) /lib64/ld-linux-x86-64.so.2 (0x00007fc520b70000)root@map:/usr/local/lib# export LD_LIBRARY_PATH=/usr/local/lib root@map:/usr/local/lib# ldd /home/kpiss/net-snmp-5.7.3/agent/mibgroup/chanctsnmp linux-vdso.so.1 => (0x00007fffef1fe000) libnetsnmpmibs.so.30 => /usr/local/lib/libnetsnmpmibs.so.30 (0x00007fc14b29c000) libnetsnmpagent.so.30 => /usr/local/lib/libnetsnmpagent.so.30 (0x00007fc14b03a000) libnetsnmp.so.30 => /usr/local/lib/libnetsnmp.so.30 (0x00007fc14ad50000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc14a98a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc14a786000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc14a568000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc14a360000) /lib64/ld-linux-x86-64.so.2 (0x00007fc14b70a000)
Refer:
Https://www.mail-archive.com/net-snmp-users%40lists.sourceforge.net/msg16168.html