Installed MongoDb on Ubuntu, says its not installed

Installed MongoDb on Ubuntu, says its not installed

Installed MongoDb on Ubuntu following the step by step instructions on the site
I receive the following error when I try and run mongo. “The program ‘mongo’ is currently not installed.”

Yet it is in the directory.

[email protected]:~$ mkdir -p mongodb
[email protected]:~$ ls

mongodb      mongodb-linux-x86_64-2.5.4.tgz

[email protected]:~$ cp -R -n mongodb-linux-x86_64-2.5.4/ mongodb
[email protected]:~$ cd mongodb
[email protected]:~/mongodb$ ls


[email protected]:~/mongodb$ cd mongodb-linux-x86_64-2.5.4/
[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4$ ls


[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4$ cd bin/
[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4/bin$ ls

bsondump  mongodump    mongoimport  mongorestore  mongotop
mongo     mongoexport  mongooplog   mongos
mongod    mongofiles   mongoperf    mongostat

[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4/bin$ mongo

The program 'mongo' is currently not installed. You can install it by typing:
sudo apt-get install mongodb-clients

[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4/bin$

It says it is not installed because:

[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4/bin$ mongo

Makes the shell search the OS $PATH to find matching programs. Since you downloaded from the internet and extracted it you actually need:

[email protected]:~/mongodb/mongodb-linux-x86_64-2.5.4/bin$ ./mongo

So that it searches the current directory for the program. Or you can add it to the $PATH if you want.

I am unsure if official repos have the unstable edition, as denoted by odd version numbers, i.e. 2.5.x.

see preferred way to install mongodb and all it’s dependencies on Ubuntu at 10gen installation doc, add 10gen mongodb public GPG key and:

sudo apt-get install mongodb-10gen