I am following "tutorialforlinux.com/2014/12/13/how-to-install-mongodb-for-linux-debian-9-sid-32-64bit-step-by-step-easy-guide/" tutorial to install MongoDB in kali linux 2.0.

MongoDb version I want to install -- MongoDB 3.2.0- 64Bit.

OS -- Kali linux 2.0 (Sana)- 64Bit.

"please add 'http://' after following, I was restricted to post more than 2 links in this post

Problem occurs while installing apt repositories i. running

sudo apt-get update

Here are the pictures of errors. enter image description here

enter image description here

and finally when I run

sudo apt-get install mongodb-10gen

It says:

Package mongodb-10gen is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb-10gen' has no installation candidate

First, your problem with updating appears to be a common one for kali (per Google), try waiting a while or following these instructions: http://www.clausconrad.com/blog/error-404-updating-kali-linux.

As for Mongodb `apt-get' is trying to install a debian package. It will do its best as they are both apt-get systems and it's possible it might work if if you got really lucky but it's really not a good idea as you'd be essentially mixing distros and you could completely mess up your kali if debian 9 had messed with files that were dependencies of things you already had installed and it might simply fail if you had newer versions of the dependencies already.

Instead, build mongodb from source: https://docs.mongodb.org/v3.0/tutorial/install-mongodb-on-linux/

pay attention to whether you have a 64bit or a 32bit linux. Also, pay attention, they give sample commands but the versions of mongodb they reference aren't current. For example, for the 64bit linux you want the command in step one to say (as of the date of this post): curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.0.tgz not ...-3.0.8.tgz

Also, you may want to review a basic guide to building from source such as this one, although it's for ubuntu, it's the same process: http://www.howtogeek.com/105413/how-to-compile-and-install-from-source-on-ubuntu/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.