Lately I’ve worked with mongoDB which is a great NoSQL database. A tool which can come in handy is mongosniff, which comes with mongodb binaries. Mongosniff is something like tcpdump for TCP/IP.

On my Fedora 16 x86_64 System I’m running mongodb binaries available from mongodb, this allows me to easily run the version I want. But mongosniff didn’t worked right out the box for it. When starting mongosniff I got following error: mongosniff: error while loading shared libraries: cannot open shared object file: No such file or directory.  So this mostly means that libpcap isn’t installed, but this wasn’t the case as you can see in a minute.

My first try was to install libpcap for my system but this didn’t solve the problem. A lookup with ldd showed that indeed was missing for it: =>  (0x00007fffa30d2000) => /lib64/ (0x0000003ef0400000) => /usr/lib64/ (0x0000003655a00000) => not found => /lib64/ (0x0000003ef1000000) => /lib64/ (0x0000003654600000) => /lib64/ (0x0000003ef0000000)
        /lib64/ (0x0000003eefc00000)

A check if any libpcap module was available showed that a too new version was installed and that a symlink as was missing:

ls /usr/lib64/libpcap*
/usr/lib64/        /usr/lib64/
/usr/lib64/         /usr/lib64/
/usr/lib64/     /usr/lib64/

So creating a symlink for solved the startup problem: ln -s /usr/lib64/ /usr/lib64/ If you’re running a 32bit mongodb version you may check your /usr/lib to see if the required libpcap is missing. Don’t know if this problem still exists if you’re running mongodb from the offical repositoy.

Tags: none

Tags: 64bit, fedora 16, libpcap, mongosniff
One Response to “mongosniff: error while loading shared libraries:”
  1. JMC says:

    Thank’s you saved my live … Same problem with Mandriva 2011.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Bad Behavior has blocked 2293 access attempts in the last 7 days.