Oracle VirtualBox 5.2.8 has been released on February 27th, 2018. Oracle VirtualBox 5.2 is the latest major release after launched by Oracle team. This version has the new feature to export VM to Oracle Cloud, Unattended guest installation, improved tools handling with more attractive icons. Oracle team also added an experimental feature for audio support for video recording. See the ChangeLog for more details.
This article helps you to install VirtualBox on Ubuntu 16.04 LTS systems.
Step 1 – Prerequsities
You must have logged in to your server using root or sudo privileged user. After login to your system update current packages of the system to the latest version.
sudo apt-get update sudo apt-get upgrade
Step 2 – Configure Apt Repository
Let’s import the Oracle public key to your system signed the Debian packages using the following commands.
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, you need to add Oracle VirtualBox PPA to Ubuntu system. You can do this by running the below command on your system.
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian xenial contrib"
This command will add an entry to /etc/apt/sources.list at end of the file.
Step 3 – Install Oracle VirtualBox
After completing the above steps, let’s install VirtualBox using the following commands. If you have already installed an older version of VirtualBox, Below command will update it automatically.
sudo apt-get update sudo apt-get install virtualbox-5.2
Step 4 – Launch VirtualBox
We can use dashboard shortcuts to start VirtualBox or simply run following command from a terminal.
virtualbox
51 Comments
Thank you, it worked very well.
Great tutorial, I think there is a typo. Is the line added to your /etc/apt/sources.list should be “https” and not “http”? Thanks
just get rid of the version number
sudo apt-get install virtualbox
aaaaaaa@munendra-latitude:~$ sudo apt-get install virtualbox-5.2
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
virtualbox-5.2 : Depends: libcurl3 (>= 7.16.2) but it is not installable
Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
Depends: libvpx3 (>= 1.5.0) but it is not installable
Recommends: libsdl-ttf2.0-0 but it is not installable
Recommends: gcc but it is not going to be installed
Recommends: make but it is not installable or
build-essential but it is not installable or
dpkg-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
aaaaaaa@munendra-latitude:~$
Run
sudo gedit /etc/apt/sources.list
then copy and past the following at last of the file and Save it, if your dist is xenial, or run lsb_release -c to see your dist
Then add this line in your source list, and remove others dist
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Thanks very much
worked like charm for ubuntu 16.04 on AMD 64
thanks
S
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
I can try this ,but error is not resolved, please help me.
I have the same problem! Did you solve it?
I had problem running virtualbox after setting up. This was because I was using older kernel version (4.15) on ubuntu. To find out kernel version run:
uname -r
if it shows older version, update your kernel version to 4.19
what is best way to fix issue with secure boot? since kernel module is unsigned
Its very helpful, Today I posted virtualmin 5.2 on Ubuntu 18.04 in my website.
it gives me the error
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package virtualbox-5.2
E: Couldn’t find any package by glob ‘virtualbox-5.2’
E: Couldn’t find any package by regex ‘virtualbox-5.2’
what should I do???
Which OS version are you using?
Really a good Blog…. thanx..sir
sudo apt-get update
sudo apt-get install virtualbox
works to.
Thanks for the help man.
help pls !!!!
Err:9 http://download.virtualbox.org/virtualbox/debian jaunty Release
404 Not Found [IPÂ : 193.140.13.73 80]
Lecture des listes de paquets… Fait
E: The repository ‘http://download.virtualbox.org/virtualbox/debian artful Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Nice.It helped me. Thank you
Trying to install into Linux Mint 17.2 Rafaela, upon running sudo apt-get install virtualbox-5.1 I get “E: Couldn’t find any package by regex ‘virtualbox-5.1′”
thanks a lot my friend!! run very well
thanks a lot for publishing this guide.
Thank you man, your tutorial was on point. Simple and direct.
root@messack-Latitude-E6410:~# sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
root@messack-Latitude-E6410:~# sudo apt-get update
E: Type ‘“deb’ is not known on line 52 in source list /etc/apt/sources.list
E: The list of sources could not be read.
Thanks so much, finally got me going in Ubuntu 17.04.
Thanks a lot. It works in my trusty
Thanks a lot
Thanks a lot
user@user:~$ lsb_release -c
Codename: xenial
user@user:~$ deb http://download.virtualbox.org/virtualbox/debian xenial contrib
No command ‘deb’ found, did you mean:
Command ‘dab’ from package ‘bsdgames’ (universe)
Command ‘deb3’ from package ‘quilt’ (universe)
Command ‘debi’ from package ‘devscripts’ (main)
Command ‘derb’ from package ‘icu-devtools’ (main)
Command ‘dub’ from package ‘dub’ (universe)
Command ‘debc’ from package ‘devscripts’ (main)
Command ‘xdeb’ from package ‘xdeb’ (universe)
Command ‘dex’ from package ‘dex’ (universe)
deb: command not found
hi insted of your commande use this one below
sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
then upadate with
sudo apt update
Nope. Didn’t work.
daniel@daniel-Lenovo-ideapad-100-15IBD:~$ deb http://download.virtualbox.org/virtualbox/debian xenial contrib
No command ‘deb’ found, did you mean:
Command ‘deb3’ from package ‘quilt’ (universe)
Command ‘debi’ from package ‘devscripts’ (main)
Command ‘dab’ from package ‘bsdgames’ (universe)
Command ‘dex’ from package ‘dex’ (universe)
Command ‘debc’ from package ‘devscripts’ (main)
Command ‘derb’ from package ‘icu-devtools’ (main)
Command ‘xdeb’ from package ‘xdeb’ (universe)
Command ‘dub’ from package ‘dub’ (universe)
deb: command not found
daniel@daniel-Lenovo-ideapad-100-15IBD:~$ sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib”
“deb http://download.virtualbox.org/virtualbox/debian xenial contrib”
daniel@daniel-Lenovo-ideapad-100-15IBD:~$ /etc/apt/sources.list
-bash: /etc/apt/sources.list: Permission denied
daniel@daniel-Lenovo-ideapad-100-15IBD:~$ lsb_release -c
Codename: xenial
daniel@daniel-Lenovo-ideapad-100-15IBD:~$ sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
-bash: /etc/apt/sources.list: Permission denied
daniel@daniel-Lenovo-ideapad-100-15IBD:~$
Hi Denial,
It looks “daniel” user doesn’t have sudo privileges on your system. Please switch to root user or any user with sudo access and run following command.
<
root@Cooper:~# $ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add –
$: command not found
gpg: no valid OpenPGP data found.
I dont know what i did wrong, thanks in advance.
It looks you copied command with dollar “$” symbol. Please copy command without dollar prompt.
Add that ‘Command’ to the file: /etc/apt.sources.list
;D
Don’t worry, we all started n00bish
sudo gedit /etc/apt/sources.list
then copy and past the following at last of the file and Save it.
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Its not working for me. Saying that vboxdrv kernel module is not loaded. Please run /sbin/vboxconfig to recompile and run. However when I tried this, its not working again.
Thank you very much! This really helped.
Hello. I used this guide and i got it installed fine. However I noticed that when I open virtualbox from the search bar its different than when I open it from the terminal using virtualbox.
When I open it from the search the file options is missing, doesnt show the virtual machines, and the GUI is different. If I open from terminal then I can get the file option and it shows the virtual machines.
I`m not sure if this is normal or not … but it seems really weird. I do not have two different versions installed. I am on Ubuntu 14.04 x64.
Is there a way to get the terminal version to open without having to run through terminal, like make a shorcut to that version or something? I dont really want the terminal open all the time just to use virtualbox. When I close out of terminal the program closes out as I`m sure you know.
Thanks for any help on this!
update:
It seems to be a difference of root. If I am root by say sudo -i in terminal and then run virtualbox I get the right version to run with all the options and virtual machines.
However if I am not root and type virtualbox I get a watered down version and now virtual machines. This is the same version that I get if I just open it using search.
I hope this gives more info into whats going on… if anyone sees this.
Fetched 819 B in 23s (35 B/s)
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 63F7D4AFF6D61D45
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
i download wheezy but download was squeee Fetched 819 B in 23s (35 B/s)
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 63F7D4AFF6D61D45
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Hi.
Very nice and easy to follow guide. However, what now?
How do I run Virtual Box from my clientcomputer?
Hi, so I have an issue here…
desktop@steamos:~$ sudo apt-get install virtualbox-5.0
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package virtualbox-5.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘virtualbox-5.0’ has no installation candidate
What do I do?! Thanks
Hi Rahul,
Works like a charme, thank you for your clear instructions ! Extension pack is already included, USB support worked out of the box.
Best greetings from Germany.
Arno
Hi Rahul,
I am getting the following error, trying out in Ubuntu 12.04
ou might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
virtualbox-4.3 : Depends: libvpx1 (>= 1.0.0) but it is not going to be installed
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
Conflicts: virtualbox-4.3:i386 but 4.3.18-96516~Ubuntu~precise is to be installed
virtualbox-4.3:i386 : Depends: libc6:i386 (>= 2.15) but it is not going to be installed
Depends: libcurl3:i386 (>= 7.16.2-1) but it is not going to be installed
Depends: libdevmapper1.02.1:i386 (>= 2:1.02.20) but it is not going to be installed
Depends: libgcc1:i386 (>= 1:4.1.1) but it is not going to be installed
Depends: libgl1-mesa-glx:i386 or
libgl1:i386
Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed
Depends: libpython2.7:i386 (>= 2.7) but it is not going to be installed
Depends: libqt4-network:i386 (>= 4:4.5.3) but it is not going to be installed
Depends: libqt4-opengl:i386 (>= 4:4.7.2) but it is not going to be installed
Depends: libqtcore4:i386 (>= 4:4.8.0) but it is not going to be installed
Depends: libqtgui4:i386 (>= 4:4.8.0) but it is not going to be installed
Depends: libsdl1.2debian:i386 (>= 1.2.10-1) but it is not going to be installed
Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not going to be installed
Depends: libstdc++6:i386 (>= 4.6) but it is not going to be installed
Depends: libvpx1:i386 (>= 1.0.0) but it is not going to be installed
Depends: libx11-6:i386 but it is not going to be installed
Depends: libxcursor1:i386 (> 1.1.2) but it is not going to be installed
Depends: libxext6:i386 but it is not going to be installed
Depends: libxinerama1:i386 but it is not going to be installed
Depends: libxml2:i386 (>= 2.7.4) but it is not going to be installed
Depends: libxmu6:i386 but it is not going to be installed
Depends: libxt6:i386 but it is not going to be installed
Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
Depends: psmisc:i386 but it is not going to be installed
Recommends: libasound2:i386 but it is not going to be installed
Recommends: libpulse0:i386 but it is not going to be installed
Recommends: libsdl-ttf2.0-0:i386 but it is not going to be installed
Recommends: dkms:i386 but it is not installable
Recommends: linux-headers:i386
Recommends: gcc:i386 but it is not going to be installed
Recommends: make:i386 but it is not going to be installed
Recommends: binutils:i386 but it is not going to be installed
Recommends: pdf-viewer:i386
Recommends: libgl1:i386
Conflicts: virtualbox-4.3 but 4.3.18-96516~Ubuntu~precise is to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
I had the same issue. You are most likely missing important software repositories from your /etc/apt/sources.list. https://wiki.debian.org/SourcesList.
It doesnt work on my Debian Wheezy:
virtualbox-4.3 : Depends: libc6 (>= 2.15) but 2.13-38+deb7u6 is to be installed
Also, 4.3 is not the stable version for Wheezy.
If i go ahead with the .deb will I screw my dependencies ?
Thanks very much for posting this, Rahul. The info is clear and complete (unlike the cryptic info on https://www.virtualbox.org/wiki/Linux_Downloads, and I was able to successfully install VirtualBox 4.3.18 on to my Ubuntu 14.04 OS.
Thanks. Followed your tutorial here exactly as written on a Debian Wheezy 32bit.
Everything went great, until I typed in: # virtualbox
I got an error: Failed to open the X11 display!
What am I doing wrong?
Hi Hans,
Do you have Desktop (Like: Gnome, KDE) installed on your debian ? If not please install it first.