Virtualbox – Installing the NonFree Version on Ubuntu

sudo add-apt-repository "deb lucid non-free"
wget -q -O- | sudo apt-key add -
apt-get update
apt-get install virtualbox-3.1

solve problems with package signature

when running sudo apt-get update I got the following error:

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: lucid Release: The following signatures were invalid: BADSIG 54422A4B98AB5139 Oracle Corporation (VirtualBox archive signing key) <>

To solve this I did (as found here):

sudo su
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update