Mongod: error loading shared libraries: libssl.so.10 libcrypto.so.10

Problem

I downloaded the mongodb 3.0.7 tar files. Then I added the bin directory to my path:

 export PATH=<mongodb-install-directory>/bin:$PATH 

Then, when I start the mongodb server:

 mongod --fork --logpath "/home/me/mongolog" --dbpath "/home/me/data" 

I get this error:

 mongod: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory 

What I've done

I tried this solution . In short, I updated my openssl:

 sudo apt-get update sudo apt-get install libssl1.0.0 libssl-dev 

and then:

 cd /lib/x86_64-linux-gnu sudo ln -s libssl.so.1.0.0 libssl.so.10 sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10 

but he says that he cannot find libssl.so.10 and libcrypto.so.10 . I do not know what to do!

+5
source share
6 answers
 sudo apt-get purge mongodb-org* 

Just start with here .

If you do not want 3.2, do not

 sudo apt-get install -y mongodb-org 

Define the version for all individual components in the next step.

OR you can copy the correct version link from mongodb .

You need

 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 symlink 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 symlink 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 start from a separate terminal, except for the shell.

 mongod --dbpath ~/data/db/ 

It should listen on port 27017. In the new terminal, start mongo.

 mongo 
+5
source

Mongo seems to expect 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 
+6
source

I am using MongoDB v3.4.6 on Ubuntu 14.04 LTS and have the same problem:

 mongod: error while loading shared libraries: libnetsnmpmibs.so.30: cannot open shared object file: No such file or directory 

To fix this, I had to install snmp using apt-get :

 $ sudo apt-get update $ sudo apt-get install snmp 

Hope this helps someone somewhere out there under the pale moonlight ... <8, _,) -----

+1
source

Check your server version, your system may be centos, but download the mongodb ubuntu version. Download again just fine

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.10.tgz

+1
source

I had the same error, even after the following instructions below. But my problem was solved when I tried sudo mongo

0
source

I had the same problem and I did it

  • created /data/db in the root folder (I am using a Linux distribution)
  • then mongod --dbpath ~/data/db/
  • then mongo

I hope this helps anyone who faces the same problem in the future.

0
source

Source: https://habr.com/ru/post/1235886/


All Articles