Ubuntu – How to install VirtualBox 4.1

virtualbox

How to install virtualbox-4.1.4 in ubuntu 11.04 fluently?

when apt-get install libqt* unmet dependency.
there is a long list of unmet dependency. Where start first and any command to install virtualbox fluently?

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 virtualbox-4.1 : Depends: libcurl3 (>= 7.16.2-1) but it is not going to be installed
                  Depends: libqt4-network (>= 4:4.5.3) but it is not going to be installed
                  Depends: libqt4-opengl (>= 4:4.7.0~rc1) but it is not going to be installed
                  Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
                  Depends: libqtgui4 (>= 4:4.7.0~beta1) but it is not going to be installed
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: dkms but it is not going to be installed
                  Recommends: libhal1 (>= 0.5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Best Answer

Install virtualbox 4.1 on any ubuntu version

You need to edit /etc/apt/sources.list

gksudo gedit /etc/apt/sources.list

Add the following line

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
deb http://download.virtualbox.org/virtualbox/debian natty contrib
deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free
deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free

Save and exit the file

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

Update source list

sudo apt-get update

Install virtualbox

sudo apt-get install virtualbox-4.1

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms