Sudo mongod --dbpath /data/db --logpath /var/log/mongodb/mongod.log --fork

I am trying to install mongo DB using ta.gz file,but when i run the below command

sudo mongod --dbpath /data/db --logpath /var/log/mongodb/mongod.log --fork

on the terminal i am getting below error

mongod: error while loading shared libraries: cannot open shared object file: No such file or directory

Please help.

Hi @Nagaraja_95085,

Please refer this link.

You can also setup mongo shell on your system using an easier method that has been discussed in this post.

Shubham Ranjan
Curriculum Support Engineer

Are you using windows or vagrant?
Why run the command as sudo
If you are using vagrant give proper permissions/privs to the directories and run mongod as vagrant user
It should work