I am following the simple steps to install mongoDB:


apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Worked Good


echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen



apt-get -y update



apt-get install mongodb-10gen

But this step failed with following message:

Failed to fetch http://downloads-distro.mongodb.org/repo/ubuntu-upstart/dists/dist/10gen/binary-amd64/mongodb-10gen_2.4.9_amd64.deb  Size mismatch

I am not able to get what am I doing wrong as I have been following these steps for a while and they were successful.


Adding Repository

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Install MongoDB

sudo apt-get update

sudo apt-get install mongodb-org


sudo apt-get install mongodb-org=2.6.0 mongodb-org-server=2.6.0 mongodb-org-shell=2.6.0 mongodb-org-mongos=2.6.0 mongodb-org-tools=2.6.0

Start/Stop MongoDB Service

sudo service mongod start

sudo service mongod stop

Verify MongoDB Installation

mongo --version

I just tested from here and succeeded in installing the 2.4.9 package. Is it possible something on your network is blocking/intercepting/redirecting some URLs? That has been the cause of such size mismatches that I have seen previously.

Try fetching the package itself and then installing with dpkg, something like this:

wget http://downloads-distro.mongodb.org/repo/ubuntu-upstart/dists/dist/10gen/binary-amd64/mongodb-10gen_2.4.9_amd64.deb
sudo dpkg -i mongodb-10gen_2.4.9_amd64.deb

For reference, here's the size of my file:

> ls -al mongodb-10gen_2.4.9_amd64.deb 
> -rw-r--r-- 1 adam adam 88012070 Jan 29 17:14 mongodb-10gen_2.4.9_amd64.deb

And here's an md5 for comparison:

> md5sum mongodb-10gen_2.4.9_amd64.deb
> d13eab1da5ffa2a36a30ea4a98ef9514  mongodb-10gen_2.4.9_amd64.deb
  • Thanks for the response, but i have installed it using a .deb file. :) – Sankalp Mishra Jan 30 '14 at 4:14

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.