How do I install the VirtualBox version from Oracle to install an Extension Pack?
Solution 1:
The recommended way to install and maintain the Open Source (GPL v2) Virtual Box >= 4.0 in Ubuntu would be to
Add the Oracle repository to your sources
For 32-bit system or when multiarch is not enabled:
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
The Oracle repository does not support multiarch. For 64-bit multiarch systems we add the repository with (source here)
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
You may also read notes on how a repository or a PPA works.
Download and install the signature key
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Udate your sources cache
sudo apt-get update
Install Virtual Box via the Software Center or command line
sudo apt-get install virtual-box-5.0
Replace -5.0
by the current Virtual Box release.
If you don't want to compile the kernel driver every time your kernel updates it is also recommended to install dkms by:
sudo apt-get install dkms
Download and install the Extension Pack
To gain extended functionality such as USB 2.0 or USB 3.0 support or support for Remote Desktop Protocol (RDP) you can make your Virtual Box installation closed source (see the Personal Use and Evaluation License) by downloading the Oracle Virtual Box Extension Pack.
wget http://download.virtualbox.org/virtualbox/<version>/<filename>
You have to visit the Oracle Virtual Box Download page to obtain the present download link with Virtual Box <version>
and the current <filename>
of the extension pack available for download.
Note: Extension packs always need to be for the same Virtual Box version.
Install is done by double click or with the Virtual Box Manager GUI under File -> Preferences -> Extensions:
To install an extension pack from command line we run the following command
VBoxManage extpack install [--replace] <filename>
Replace <filename>
with the path to your downloaded extension pack and use the option --replace
in case you have an older version of the extension pack already installed.
Note: On upgrading Virtual Box to a newer version we also have to manually upgrade the extension pack. This will not be done automatically from the repository.
3D support (to run Unity), better desktop integration, changing the virtual screen geometry, and more can be achieved by installing the Guest Additions.
Solution 2:
Prior to version 4.0, there were two versions of VirtualBox— one was open source, and the one that most Linux distributions shipped with was not. At this point, there should no longer be two separate editions and the "OSE" version is deprecated for versions of Ubuntu beyond 12.04.
However, the most recent version of VirtualBox is always available for the currently supported versions of Ubuntu, which is not always the case for the Ubuntu version. This will provide the latest bug fixes and features without having to wait for the packages to make their way downstream to Ubuntu.
Additionally, should you ever need support from Oracle themselves, they're more likely to give you the time of day if you're reporting from a version they released.
They provide a repository which you can add to your software sources. In other words, they build specifically with Ubuntu in mind. To add it, just follow the instructions:
# first make sure to remove your current virtualbox
sudo apt purge virtualbox
# next, add the repository to your sources
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
# add public keys to verify downloads
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
# now update to complete the process of adding the repository
sudo apt update
# install dkms if you haven't already
sudo apt install dkms
# install virtualbox; change version number as needed
sudo apt install virtualbox-5.0
One thing that's not included in the repositories, unlike it is in the Ubuntu repositories, is the Extension Pack. That means you have to manually download and install it. Since versions mismatch between the two repositories, you cannot use the Ubuntu one. Luckily, the process is to install the extension pack is fairly simple. You can find it on the normal downloads page and can be installed easily on the command line:
# make sure no VMs are running when you do this or it will fail
# and make sure to replace /path/to/ext-pack with the actual path to the downloaded extension pack ☺
vboxmanage extpack install --replace /path/to/ext-pack
Solution 3:
Before version 4.0, there were two editions of VirtualBox: a full binary containing all features and an "Open Source Edition" (OSE) with source code. With version 4.0, there is only one version any more, which is open source, and the closed-source components have been moved to a separate extension pack.
From virtualbox
So you will need to find a version prior to 4.0 or find the extension pack (I'll edit it in when I find it ;) )
edit: Here we go: Extension pack how to and download
From the 2nd link: You can install the Extension Pack from the command line using VBoxManage.
VBoxManage extpack install | uninstall [--force] | cleanup