Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Virtualization»How to Install VirtualBox 5.2 on Ubuntu 16.04 LTS

    How to Install VirtualBox 5.2 on Ubuntu 16.04 LTS

    By RahulFebruary 4, 20192 Mins Read

    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.

    Advertisement

    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
    

    virtualbox-on-ubuntu

    Oracle VirtualBox VirtualBox VirtualBox Install virtualization
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Install VirtualBox on macOS

    How to Install VirtualBox on MacOS

    How to Install VirtualBox on Ubuntu 22.04

    How to Install VirtualBox 7.0 on Ubuntu 22.04

    How to Install VirtualBox on Debian 11

    How To Install VirtualBox 7.0 on Debian 11

    View 51 Comments

    51 Comments

    1. Lorine on April 29, 2021 10:43 am

      Thank you, it worked very well.

      Reply
    2. Sam on April 14, 2019 9:31 pm

      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

      Reply
    3. tom on April 11, 2019 7:42 pm

      just get rid of the version number

      sudo apt-get install virtualbox

      Reply
    4. Munendra Singh on February 9, 2019 11:47 am

      [email protected]:~$ 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.
      [email protected]:~$

      Reply
    5. Fabio Santos on January 13, 2019 2:02 pm

      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

      Reply
    6. ahbehnam on December 20, 2018 9:58 am

      Thanks very much

      Reply
    7. Sunil on October 11, 2018 8:35 am

      worked like charm for ubuntu 16.04 on AMD 64
      thanks
      S

      Reply
    8. Yogesh on August 10, 2018 8:02 am

      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.

      Reply
      • CHAKI on September 18, 2018 8:13 am

        I have the same problem! Did you solve it?

        Reply
      • Gyurme on October 12, 2018 10:46 am

        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

        Reply
    9. ripe on July 1, 2018 7:34 am

      what is best way to fix issue with secure boot? since kernel module is unsigned

      Reply
    10. Rohit Agarwal on April 29, 2018 12:08 pm

      Its very helpful, Today I posted virtualmin 5.2 on Ubuntu 18.04 in my website.

      Reply
    11. fatemeh on March 15, 2018 7:22 am

      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???

      Reply
      • Rahul K. on March 15, 2018 10:56 am

        Which OS version are you using?

        Reply
    12. AarifAbdal on March 1, 2018 4:25 am

      Really a good Blog…. thanx..sir

      Reply
    13. dosghost on February 24, 2018 7:58 pm

      sudo apt-get update
      sudo apt-get install virtualbox

      works to.

      Reply
    14. Fongoh Tayong on December 4, 2017 8:40 pm

      Thanks for the help man.

      Reply
    15. maryiem on October 27, 2017 1:54 pm

      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.

      Reply
    16. DevMj on October 25, 2017 5:45 pm

      Nice.It helped me. Thank you

      Reply
    17. Albert on September 22, 2017 1:08 pm

      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′”

      Reply
    18. leo messi on August 26, 2017 2:41 pm

      thanks a lot my friend!! run very well

      Reply
    19. ferdinand on August 10, 2017 12:47 pm

      thanks a lot for publishing this guide.

      Reply
    20. Alessandro Gonçalves on July 14, 2017 1:25 pm

      Thank you man, your tutorial was on point. Simple and direct.

      Reply
    21. Fortune on May 4, 2017 5:02 pm

      [email protected]:~# sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
      [email protected]:~# 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.

      Reply
    22. Paul on May 2, 2017 4:55 pm

      Thanks so much, finally got me going in Ubuntu 17.04.

      Reply
    23. Ikhwan on April 8, 2017 11:41 pm

      Thanks a lot. It works in my trusty

      Reply
    24. JideGuru on April 4, 2017 10:23 pm

      Thanks a lot

      Reply
    25. Jhon on March 24, 2017 9:23 pm

      Thanks a lot

      Reply
    26. kaleem on January 22, 2017 4:32 pm

      [email protected]:~$ lsb_release -c
      Codename: xenial
      [email protected]:~$ 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

      Reply
      • anoni on January 24, 2017 5:43 pm

        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

        Reply
        • Daniel Juncos on March 28, 2017 9:50 am

          Nope. Didn’t work.

          [email protected]:~$ 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
          [email protected]:~$ sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib”
          “deb http://download.virtualbox.org/virtualbox/debian xenial contrib”
          [email protected]:~$ /etc/apt/sources.list
          -bash: /etc/apt/sources.list: Permission denied
          [email protected]:~$ lsb_release -c
          Codename: xenial
          [email protected]:~$ sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
          -bash: /etc/apt/sources.list: Permission denied
          [email protected]:~$

          Reply
          • Rahul K. on March 28, 2017 2:53 pm

            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.

            sudo echo “deb http://download.virtualbox.org/virtualbox/debian xenial contrib” >> /etc/apt/sources.list
            

            <

            Reply
            • alpacket on June 29, 2017 12:21 pm

              [email protected]:~# $ 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.

              Reply
              • Rahul K. on June 30, 2017 8:53 am

                It looks you copied command with dollar “$” symbol. Please copy command without dollar prompt.

      • A.helful.guy on January 28, 2017 8:17 am

        Add that ‘Command’ to the file: /etc/apt.sources.list
        ;D
        Don’t worry, we all started n00bish

        Reply
      • sumit sharma on November 27, 2017 8:52 am

        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

        Reply
    27. anirtek on January 20, 2017 2:06 am

      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.

      Reply
    28. Navnath Kumbhar on November 21, 2016 5:31 pm

      Thank you very much! This really helped.

      Reply
    29. Rich on April 10, 2016 2:13 am

      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!

      Reply
      • Rich on April 10, 2016 4:19 am

        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.

        Reply
    30. dondhayal on March 13, 2016 9:42 am

      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.

      Reply
    31. dondhayal on March 13, 2016 9:41 am

      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.

      Reply
    32. Carsten on February 3, 2016 10:50 am

      Hi.

      Very nice and easy to follow guide. However, what now?

      How do I run Virtual Box from my clientcomputer?

      Reply
    33. Caleb on September 11, 2015 5:43 am

      Hi, so I have an issue here…

      [email protected]:~$ 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

      Reply
    34. Arno on November 24, 2014 6:41 pm

      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

      Reply
    35. Thabung on November 14, 2014 6:04 pm

      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).

      Reply
      • A.J. on December 18, 2016 11:04 pm

        I had the same issue. You are most likely missing important software repositories from your /etc/apt/sources.list. https://wiki.debian.org/SourcesList.

        Reply
    36. Matt on November 12, 2014 8:30 am

      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 ?

      Reply
    37. Edwin Meyer on November 11, 2014 4:43 pm

      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.

      Reply
    38. Hans on October 15, 2014 8:17 am

      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?

      Reply
      • Rahul on October 17, 2014 2:52 am

        Hi Hans,

        Do you have Desktop (Like: Gnome, KDE) installed on your debian ? If not please install it first.

        Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Implementing a Linux Server Security Audit: Best Practices and Tools
    • cp Command in Linux (Copy Files Like a Pro)
    • 15 Practical Examples of dd Command in Linux
    • dd Command in Linux (Syntax, Options and Use Cases)
    • Iptables: Common Firewall Rules and Commands
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.