UPDATE :
This method also work for installing VirtualBox 4.0.2
Earlier we saw how to install VirtualBox-3.2 on Ubuntu. Updating the same to the newer version require to add repositery
To install VirtualBox 4 on Ubuntu you need to add its repository
echo "deb http://download.virtualbox.org/virtualbox/debian maverick contrib" >> /etc/apt/sources.list
You need to install apt-secure key for VirtualBox
cd /tmp wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc apt-key add oracle_vbox.asc
To install VirtualBox, do
apt-get update apt-get install virtualbox-4.0 apt-get install dkms
Related content: