0

I am trying to install virtualbox 5 on mint. Here is the output

$ sudo aptitude install virtualbox-5.0
The following NEW packages will be installed:
  virtualbox-5.0{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 64.2 MB of archives. After unpacking 161 MB will be used.
The following packages have unmet dependencies:
 virtualbox-5.0 : Depends: libdevmapper1.02.1 (>= 2:1.02.99) but 2:1.02.77-6ubuntu2 is installed.
                  Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.1 is installed.
                  Depends: libvpx2 (>= 1.4.0) which is a virtual package.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     virtualbox-5.0 [Not Installed]                     



Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

What is wrong with the dependencies?

Output of sudo apt-cache policy virtualbox virtualbox-5.0 libdevmapper1.02.1 libstdc++6 libvpx2:

sudo apt-cache policy virtualbox virtualbox-5.0 libdevmapper1.02.1 libstdc++6 libvpx2
virtualbox:
  Installed: (none)
  Candidate: 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1
  Version table:
     4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages
     4.3.10-dfsg-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
virtualbox-5.0:
  Installed: (none)
  Candidate: 5.0.16-105871~Ubuntu~wily
  Version table:
     5.0.16-105871~Ubuntu~wily 0
        700 http://download.virtualbox.org/virtualbox/debian/ wily/contrib amd64 Packages
     5.0.2-102096~Ubuntu~trusty 0
        700 http://extra.linuxmint.com/ qiana/main amd64 Packages
libdevmapper1.02.1:
  Installed: 2:1.02.77-6ubuntu2
  Candidate: 2:1.02.77-6ubuntu2
  Version table:
 *** 2:1.02.77-6ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
libstdc++6:
  Installed: 4.8.4-2ubuntu1~14.04.1
  Candidate: 4.8.4-2ubuntu1~14.04.1
  Version table:
 *** 4.8.4-2ubuntu1~14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     4.8.2-19ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libvpx2:
  Installed: (none)
  Candidate: (none)
  Version table:

Output of sudo apt-get install virtualbox-5:

sudo apt-get install virtualbox-5.0
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.0 : Depends: libdevmapper1.02.1 (>= 2:1.02.99) but 2:1.02.77-6ubuntu2 is to be installed
                  Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.1 is to be installed
                  Depends: libvpx2 (>= 1.4.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
  • Output of apt-cache policy virtualbox virtualbox-5.0 libdevmapper1.02.1 libstdc++6 libvpx2 please. Also post the output of apt-get install virtualbox-5.0. Post in the question, not as a comment. – Faheem Mitha Mar 4 '16 at 13:05
  • BTW, your question says Mint but your tag says Ubuntu. Which is it? If it's mint, it should be tagged linux-mint. – Faheem Mitha Mar 4 '16 at 15:25
  • Its Mint, but there was no Mint tag in existence. Therefore I put Ubuntu as it is based on that distro. – user11498 Mar 7 '16 at 6:07
  • Sure there is, linux-mint. I just used it above. – Faheem Mitha Mar 7 '16 at 7:37
  • See my first comment. If you want an answer, please provide the output as requested. – Faheem Mitha Mar 8 '16 at 14:50
1

To install virtualbox, follow these steps:

  1. sudo apt-get remove virtualbox virtualbox-4.* virtualbox-5.0
  2. Download virtualbox.
  3. sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian [name of your distribution] contrib" >> /etc/apt/sources.list.d/virtualbox.list
  4. wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

This answer was taken from here.

`

1

Try taking out the download.virtualbox.org sources. I'd stick with your distribution's packages unless you have compelling reasons to switch

  • Yup. Once this is done, then a simple apt-get install virtualbox virtualbox-dkms virtualbox-qt should get everything just fine. – ivanivan Oct 27 '17 at 17:12
0

Edit /etc/apt/sources.list file and add one of following line :

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

Save and exit

update using :sudo apt-get update

According to virtualbox_wiki you need to Install dkms

sudo apt-get install dkms

Setup oracle public key:

wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
sudo apt-key add oracle_vbox.asc

Install Oracle VirtualBox

sudo apt-get update
sudo apt-get install virtualbox-5.0
  • That was what I did. Same error. – user11498 Mar 7 '16 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.