We covered installing TOR in Ubuntu Jaunty, Intrepid and Hardy, but TOR does not provide a repository for Ubuntu Karmic. Using the Jaunty repository doesn't work but here's a 'trick'.
Instead of adding an Ubuntu repository, add a Debian repo. For Karmic Koala, add the Sid repository and get the key:
Now you'll be able to successfully installing TOR in Ubuntu Karmic:
Update: Alternatively, there is also an Launchpad PPA for Tor:
Full how-to on using TOR.
sudo sh -c 'echo deb "http://deb.torproject.org/torproject.org sid main" >> /etc/apt/sources.list'
gpg --recv 74A941BA219EC810
gpg --export --armor 74A941BA219EC810 | sudo apt-key add -
Now you'll be able to successfully installing TOR in Ubuntu Karmic:
sudo apt-get update && sudo apt-get install tor tor-geoipdb privoxy
Update: Alternatively, there is also an Launchpad PPA for Tor:
sudo add-apt-repository ppa:sevenmachines/tor
Full how-to on using TOR.