error while loading shared libraries: libnetsnmpagent.so.20: cannot open shared object file: No such file or directory

You’ll see below error while starting mongod instance, while you miss libnetsnmpagent.so.20 library files in your /usr/lib or /usr/lib64 folders.

 
[ root @ vm-5cc5-bad6 : ~ ] ll -lhtr /usr/lib64/libnetsnmpagent.so.20
lrwxrwxrwx 1 root root 25 Mar  7  2015 /usr/lib64/libnetsnmpagent.so.20 -> libnetsnmpagent.so.20.0.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mv /usr/lib64/libnetsnmpagent.so.20 /tmp/
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] cd /opt/mongodb/bin/
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] ps -ef | grep mongo
root      7388  7263  0 06:43 pts/1    00:00:00 grep mongo
root     32343     1  0 02:11 ?        00:00:44 ./mongod –dbpath /mongodbdata –logpath /logs/mongod.log –smallfiles –nojournal
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] kill 32343
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] ./mongod –dbpath /mongodbdata –logpath /logs/mongod.log –smallfiles –nojournal
./mongod: error while loading shared libraries: libnetsnmpagent.so.20: cannot open shared object file: No such file or directory
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] mv /tmp/libnetsnmpagent.so.20  /usr/lib64/
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]  ./mongod –dbpath /mongodbdata –logpath /logs/mongod.log –smallfiles –nojournal &
[1] 7592
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] 2015-09-16T06:44:41.985-0400 log file “/logs/mongod.log” exists; moved to “/logs/mongod.log.2015-09-16T10-44-41”.
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ]
[ root @ vm-5cc5-bad6 : /opt/mongodb/bin ] ./mongo
MongoDB shell version: 2.6.9
connecting to: test
>
>

  • Ask Question