Install virtualbox 4.2.6 on ubuntu 12.10 precise

By | May 29, 2013


Virtualbox is the most popular virtualisation solution for x86 and AMD64/Intel64 platforms. Its featureful yet very easy to use. If you are virtualising then its recommended to have the latest version installed so that all recent operating systems will have best compatibility in the virtual environment.

The software repository of Ubuntu 12.10 contains an older version of virtualbox (4.1.18). To install the latest version of virtualbox on ubuntu precise do the following

Add the virtualbox repository to the apt source file

$ gksudo gedit /etc/apt/sources.list

add the following line to the end of the file

deb precise contrib

Install the PGP key using the following command

$ wget -q -O- | sudo apt-key add -

The wget command gets the key which is fed into the apt-key command.

Update the package list

$ sudo apt-get update

Install VirtualBox 4.2.6

$ sudo apt-get install virtualbox-4.2

If you do not want to follow the above steps then download the deb file directly from

and install it right away.

Compile the VirtualBox Kernel modules

After the virtualbox package is installed, the kernel modules have to be compiled. Without it virtualbox wont run.

First install the linux headers.

$ sudo apt-get install linux-headers-`uname -r`

Now compile virtualbox kernel modules

$ sudo /etc/init.d/vboxdrv setup
 * Stopping VirtualBox kernel modules                                                           [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                                              [ OK ] 
 * Trying to register the VirtualBox kernel modules using DKMS                                  [ OK ] 
 * Starting VirtualBox kernel modules                                                           [ OK ] 

If all the steps show OK, then the compilation succeeded and now virtualbox is ready to use. If any error occurs then the "/var/log/vbox-install.log" file will contain details about what went wrong.

Last Updated On : 29th May 2013

Leave a Reply

Your email address will not be published. Required fields are marked *