Problem
I downloaded the mongodb 3.0.7
tar files. Then I added the bin directory to my path:
export PATH=
Seems that mongo is expecting libssl files in /usr/lib/
:
sudo cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.10
sudo cp /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.10
I'm using MongoDB v3.4.6 on Ubuntu 14.04 LTS and have the same issue:
mongod: error while loading shared libraries: libnetsnmpmibs.so.30: cannot open shared object file: No such file or directory
To FIX it, I had to install snmp with apt-get
:
$ sudo apt-get update
$ sudo apt-get install snmp
Hope this helps someone somewhere out there beneath the pale moonlight... <8,_,)-----
I had the same error, even after following instructions below. But my problem was solved when I tried sudo mongo
sudo apt-get purge mongodb-org*
Just start over from here.
If you don't want 3.2, do not
sudo apt-get install -y mongodb-org
Specify the version for all the individual components in the next step.
OR you can copy the correct version link from mongodb.
You will need to
cd /Downloads
wget wget https://fastdl.mongodb.org/linux/mongodb-correct-version.tgz
tar -zxvf mongodb-correct-version.tgz
You should see all the executables. Make sure /usr/local/bin is in your PATH
echo $PATH
Create a symbolic link for the mongod server and check the version.
sudo ln -s ~/Downloads/mongodb-correct-version/bin/mongod /usr/local/sbin/bin/mongod
mongod --version
Now create a symbolic link for the shell and check the version.
sudo ln -s ~/Downloads/mongodb-correct-version/bin/mongo /usr/local/bin/mongo
mongo --version
Create a directory path for the server.
mkdir ~/data
mkdir ~/data/db
Start the server and let it run from a separate terminal than the shell.
mongod --dbpath ~/data/db/
It should be listening on port 27017. In a new terminal, start mongo.
mongo
Check your server version, your system may be centos, but downloaded the ubuntu version of the mongodb. Download again just fine
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.10.tgz