Debian Linux: Install Virtualbox Virtualization Software

by on May 7, 2012 · 2 comments· LAST UPDATED June 5, 2012

in , ,

I'm a home user and how do I install VirtualBox virtualization software for my home use under Debian Linux 6 operating systems?

Oracle VM VirtualBox (formerly Sun VirtualBox) is a virtualization software package.

You need to install VirtualBox on an existing Linux host operating system as an application. Once installed you can add guest operating systems such as MS-Windows, Fedora, Ubuntu, FreeBSD, OpenBSD and so on.

Option #1: Install VirtualBox using apt-get command

Type the following command as the root user:
# apt-get install virtualbox
Sample outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  radvd
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libvncserver0 virtualbox-dkms virtualbox-qt
Suggested packages:
  libvncserver0-dbg virtualbox-guest-additions-iso vde2
The following NEW packages will be installed:
  libvncserver0 virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.
Need to get 21.6 MB of archives.
After this operation, 65.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Option #2: Install VirtualBox Using Oracle Provided Binaries

This option allows you to install the latest version. You need to download the package here. Please note that package architecture has to match the Linux kernel architecture. For example, if you are running a 64-bit kernel, install the appropriate AMD64 package (it does not matter if you have an Intel or an AMD CPU). You can use the wget command to download .deb file:
$ cd /tmp
$ wget http://download.virtualbox.org/virtualbox/4.1.14/virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb

Sample outputs:

--2012-05-08 00:42:52--  http://download.virtualbox.org/virtualbox/4.1.14/virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
Resolving download.virtualbox.org... 137.254.16.69
Connecting to download.virtualbox.org|137.254.16.69|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70360054 (67M) [application/x-debian-package]
Saving to: `virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb'
100%[==========================================================>] 7,03,60,054  469K/s   in 2m 32s
2012-05-08 00:45:26 (451 KB/s) - `virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb' saved [70360054/70360054]

You can use dpkg command to install .deb package, enter:
$ sudo dpkg -i virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
OR
# dpkg -i virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
Sample outputs:

Selecting previously deselected package virtualbox-4.1.
(Reading database ... 196053 files and directories currently installed.)
Unpacking virtualbox-4.1 (from virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb) ...
Setting up virtualbox-4.1 (4.1.14-77440~Debian~squeeze) ...
Adding group `vboxusers' (GID 124) ...
Done.
Stopping VirtualBox kernel modules:.
Uninstalling old VirtualBox DKMS kernel modules:.
Trying to register the VirtualBox kernel modules using DKMS:.
Starting VirtualBox kernel modules:.
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-central ...

How do I start Virtualbox?

In GNOME, visit:
GNOME menu > Applications > System tools > VirtualBox OSE
OR
GNOME menu > Applications > System tools > Oracle VM VirtualBox
In KDE, visit:
KDE menu > System > VirtualBox OSE
OR
KDE menu > System > Oracle VM VirtualBox
You can also type the following command using an X terminal:
$ virtualbox &
Sample outputs:

Debian Linux apt-get install Oracle VM VirtualBox Manager

Fig.01: Oracle VM VirtualBox in action

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Alan June 17, 2012 at 1:15 pm

I’m running Ubuntu 10.04 (lucid)
Kernel 3.0.0-13-lowlatency-pae (#21~ppa1-Ubuntu SMP PREEMPT Tue Oct 18 07:50:35 UTC 2011)
Oracle VB 4.0.16r75491
and when I try to start a machine I get:

Terminated with error code 1

Result Code:
NS_ERROR_FAILURE (0×80004005)
Component:
Machine
Interface:
IMachine {662c175e-a69d-40b8-a77a-1d719d0ab062}

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

‘/etc/init.d/vboxdrv setup’

as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

When I run “‘/etc/init.d/vboxdrv setup’” I get errors saying it can’t find Linux headers.
Any idea what went wrong and how to fix it?
I have tried other versions with the same result.

Reply

2 Angel Le Blanc V.B February 18, 2013 at 12:41 am

Don’t you forget tell us we should add ourselves to virtualbox group?

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: