Virtualbox 5.1 Released, How to Install in Ubuntu 16.04

Last updated: July 13, 2016

virtualbox-icon245

Oracle Virtualbox has just reached a new major 5.1 release. Here’s how to install it in Ubuntu 16.04.

Virtualbox 5.1 ports its UI to Qt5, brings better Python 3 support, HDA (High Definition Audio) support for newer Linux guests, various VMM and other improvements and fixes.

Virtualbox release highlights:

  • VMM: new APIC and I/O APIC implementations that result in significantly improved performance in certain situations
  • VMM: added support for Hyper-V paravirtualized debugging of Windows guests
  • VMM: emulate even more MMIO and shadow pagetable exits without going back to user mode
  • GUI: overall migration to Qt5
  • GUI: passive API event listener improving the VM GUI performance and response time
  • Audio: added HDA (High Definition Audio) support for newer Linux guests
  • Audio: added on-demand timers which should improve the overall performance and reduce the CPU consumption
  • Audio: more fine-grained volume control for the AC’97 emulation, which now also takes the master volume control into account
  • better support for Python 3
  • For more details, see the ChangeLog.

Virtualbox 5.1

How to install Virtualbox 5.1 in Ubuntu:

1. The 5.1 release conflicts with the old 5.0 or 4.x releases, so first open terminal (Ctrl+Alt+T) and run command to remove the previous VBox installation:

sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*

2. Download Virtualbox 5.1 for your OS (i386=32bit, amd64=64bit):

Download Virtualbox for Linux

Then click install via Ubuntu Software.

3. For those who want to install VBox 5.1 from official Linux repository and receive future updates via Software Updater. Run the commands below one by one in terminal:

sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list'

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

sudo apt update

sudo apt install virtualbox-5.1

According to your Ubuntu codename, replace xenial with wily, trusty, or precise.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

27 responses to Virtualbox 5.1 Released, How to Install in Ubuntu 16.04

  1. Missing dependency step:

    sudo apt-get install libqt5x11extras5

  2. tried this and many other install procedures of VBOX 5.1 on 16.04
    always end up geting the error when attempting to start Vbox after installation:

    Failed to acquire the VirtualBox COM object.

    The application will now terminate.

    Callee RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)

  3. Ubuntu guys have screwed the pooch with this release.
    on Ubuntu Xenial …. it wont install the correct 5.1 kernel drivers it keeps building 5.0.24.
    when you use teh apt-get method after editing the sources.list file

    Keep getting RTR3InitEx failed with rc=-1912 (rc=-1912)

    working on a fix as uninstall / reinstall does not work

  4. I have followed your procedure yet installation of Ubuntu 16.04 on virtualbox is not successful. The virtual box doesn’t give me the option of selecting any 64bits once Linux is selected even though am running on ubuntu 16.04 and my laptop is 64bit.

  5. I had the same problem…any solution?

  6. same result.

    used:
    sudo apt-get autoremove ‘virtualbox*’

    and then applied:
    sudo sh -c ‘echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list.d/virtualbox.list’

    wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add –

    sudo apt update

    sudo apt install virtualbox-5.1

    and it came back to service.

  7. Hi there,

    I have a problem after following step by step instructions installing virtualbox 5.1 on ubuntu 16.04 Desktop version.

    vboxdrv.sh: failed: modprobe vboxdrv failed. Please use ‘dmesg’ to find out why.

    There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconig as root.

    I did the whole process as ‘root’ again the same problem.

    I run sudo /sbin/vboxfonfig as ‘root’ again the same problem.

    Thank you

    • hi, I have the same problem did you fix it, please I really need to isntall a virtualbox in my ubuntu 16.04,

  8. kool@kool-TravelMate-7720 ~ $ sudo apt install virtualbox-5.1
    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.1 : Depends: libdevmapper1.02.1 (>= 2:1.02.97) but 2:1.02.77-6ubuntu2 is to be installed
    Depends: libqt5core5a (>= 5.5.0) but 5.2.1+dfsg-1ubuntu14.3 is to be installed
    Depends: libqt5gui5 (>= 5.3.0) but 5.2.1+dfsg-1ubuntu14.3 is to be installed or
    libqt5gui5-gles (>= 5.3.0) but it is not installable
    Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.3 is to be installed
    Depends: libvpx3 (>= 1.5.0) but it is not installable
    E: Unable to correct problems, you have held broken packages.

    • @Mark I am getting the same error on ubuntu 16.04. Did you manage to fix the error. If yes how did you fix the error.

    • Check your sources line has the correct base for ubuntu, e.g.

      deb http://download.virtualbox.org/virtualbox/debian xenial contrib

      According to your distribution, replace ‘xenial’ by ‘vivid’, ‘utopic’, ‘trusty’, ‘raring’, ‘quantal’, ‘precise’, ‘lucid’, ‘jessie’, ‘wheezy’, or ‘squeeze’.

      I had to replace mine with trusty for Mint 17.x

  9. I’m having an issue on Kubuntu 16.10. When I try to do sudo apt update or sudo apt install virtualbox-5.1, it says “Malformed entry 1 in list file /etc/apt/sources.list.d/virtualbox.list (Suite)”

    Any idea how to resolve this? Thanks.

    • Edit to my previous comment:
      =======================
      I found out my issue. I just had to delete all the text in the virtualbox.list file via nano. It’s installing correctly now, currently at 78% installation.

  10. After following your instructions, VB does not start and can’t manage it. System administration is more than just installation. Best stick to Blogging.

  11. First remove all dependencies of previous vm installations

    sudo apt autoremove virtualbox virtualbox-5.0 virtualbox-4.*

    Then use the link to download vm using terminal

    #wget http://download.virtualbox.org/virtualbox/5.1.8/virtualbox-5.1_5.1.8-111374~Ubuntu~xenial_amd64.deb

    Installation after file download complete

    #sudo dpkg -i –force-depends virtualbox-5.1_5.1.8-111374~Ubuntu~xenial_amd64.deb

    • root@jfabian:/home/jfabian# dpkg -i –force-depends virtualbox-5.1_5.1.8-111374~Ubuntu~xenial_amd64.deb
      dpkg: erro ao processar o arquivo –force-depends (–install):
      não pode aceder ao arquivo: Ficheiro ou directoria inexistente
      dpkg: erro ao processar o arquivo virtualbox-5.1_5.1.8-111374~Ubuntu~xenial_amd64.deb (–install):
      não pode aceder ao arquivo: Ficheiro ou directoria inexistente
      Foram encontrados erros enquanto processava:
      –force-depends
      virtualbox-5.1_5.1.8-111374~Ubuntu~xenial_amd64.deb

      • Realy? Using Linux in other language than english? It makes no sense? How come you want to resolve issues and cope with maintaince? It is impossible to quick search the web in language other than english.

  12. try this first for unmet dependencies
    sudo apt-get install -f

  13. I got the “Failed to acquire the VirtualBox COM object” error, along with a total failure to start VirtualBox on Ubuntu 14.04. I noticed that my ~/.config/VirtualBox/VirtualBox.xml file was empty, but there was a non-empty file called VirtualBox.xml-prev. Probably the wrong thing to do, but I tried swapping them over and VB starts OK now.

  14. Hi,

    My simple solution to all these problems was:

    It was that secure boot thing installed by Ubuntu while upgrading. The instructions were not clear as to how to remove that secure boot thing but i managed to do it.

    Restart your computer after installed the DKMS drivers for VBOX
    You will be prompted with a blue screen with 2 options: wait or change MDK settings
    Choosing change MDK settings and enter the password characters as requested, you have to press on the key corresponding to the character index being asked for and then press ENTER.
    After entering 2 or 3 characters, they will ask you if you want to remove secure boot, say yes!
    Computer will restart, once you are back it should work!

    For more: refer this link: http://askubuntu.com/questions/762136/cannot-reinstall-virtualbox-on-ubuntu-16-04

  15. Thank you it has worked for me :)

  16. Well I don’t have secure boot on my computer and have tried all the suggestions and I still get –

    Kernel driver not installed (rc=-1908)

    vboxdrv is either not loaded or there is a permission problem with /dev/vboxdrv

    Help?

    • ended up upgrading to 16.10 installed VB via sources didn’t work tried to purge again but it complained it wasn’t there?

      Then I installed again using the commands from below

      http://www.ubuntumaniac.com/2016/10/install-oracle-virtualbox-518-on-ubuntu.html

      and it installed and worked. I have to say it feels completely random – VirtualBox people say it’s a Linux problem – and Linux people say its VB.. so with the thousands of “solutions” out there this worked for me. Not entirely happy tho, as I was forced to 16.10 – Moral of the story don’t install updates unless you know they work or you can roll back to a previous state.

      Peace out!

  17. supprimer la 5.0 avant d’installer la 5.1
    sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*
    sudo apt autoremove

    download latest version of virtualbox:
    http://download.virtualbox.org/virtualbox/5.1.16/virtualbox-5.1_5.1.16-113841~Ubuntu~xenial_amd64.deb

    Add the following line to your /etc/apt/sources.list:
    deb http://download.virtualbox.org/virtualbox/debian xenial contrib

    The Oracle public key for apt-secure can be downloaded and registered:
    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 –

    To install VirtualBox, do
    sudo apt-get update
    sudo apt-get install virtualbox-5.1

    The dkms package can be installed through the following command:
    sudo apt-get install dkms

    ->
    it worked well for me, except the install command line but the package installer worked well directly after downloading.
    While starting Virtualbox (5.1.16) it asked to download/update the Guest Additions then cleaning the old ones. Fine!