Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB installation error: "mongod: error while loading shared libraries: libc++.so.1..."

I use this tutorial to install mongodb on my 64 bit Ubuntu OS:

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-linux/

After finish the installation i enter:

mongo

Since then, an error message appear:

mongod: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory

Do you have any idea to solve this problem ? Here is my system information:

OS: Ubuntu 14.04 LTS.
OS Type: 64 bit.
MongoDB version: mongodb-linux-x86_64-ubuntu1410-clang-3.0.6.
like image 822
Tien Nguyen Avatar asked Oct 07 '15 08:10

Tien Nguyen


2 Answers

I use Ubuntu 14.04.3 64-bits (mongodb-linux-x86_64-ubuntu1410-clang-3.2.4), I was able to install libc++.so.1 related packages using the following commands:

sudo apt-get update
sudo apt-get install libc++1

Note: My Ubuntu VM using corporate proxy, initially 'sudo apt-get install libc++1' gave an error. Since I have Synaptic Package Manager installed, I tried Synaptic to install libc++1 and it was successful. MongoDB started and worked. To double check whether the mentioned command works, I did

sudo apt-get remove libc++1
sudo apt-get install libc++1

and the commands worked. In case you need to using Synaptic as well, here is the screen shot ubuntu-install-libc++1

like image 162
Jonathan L Avatar answered Oct 12 '22 14:10

Jonathan L


OS: Ubuntu 16.04

MongoDB: 3.2.6

Requires to execute below commands in order to work with mongod

sudo apt-get update

sudo apt-get install libc++1

like image 38
anilkjb Avatar answered Oct 12 '22 13:10

anilkjb