The MongoDB package maintainers don't provide dedicated aptitute packages for older Ubuntu releases, i'll show you how you can install MongoDB through packages on these unsupported versions.

Today I needed to install MongoDB on one of my servers, however it still runs on 8.04 LTS, and MongoDB don't provide a dedicated apt package for that release. However you can safely use the 9.04 Jaunty source lines. It will at least save you compiling from source and maintaining it yourself.

Edit your sources.list...

sudo nano /etc/apt/sources.list

Add this to the bottom...

deb http://downloads.mongodb.org/distros/ubuntu 9.4 10gen

Then run these commands...

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo apt-get update

Finally install MongoDB...

sudo apt-get install mongodb-stable

Job done!