1

I'm having issues installing VirtualBox 5.2 on my 64-bit Linux Mint (4.13.0-32-generic (result from uname -r command)). I've read about this issue on a few different sites but none of their solutions resolved my problem.

The only solution I haven't tried yet is manually removing all of the original VirtualBox files and folders that are left behind after an uninstall (I have not done this as I'm unsure of which files/folders to remove). I've run the remove -purge VirtualBox -all command or something similar to that. All to no avail.

The last issue I'm encountering is the following error:

sudo apt-get install -f 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: libqt5core5a (>= 5.7.0) but 5.5.1+dfsg-16ubuntu7.5 is to be installed
                  Depends: libqt5widgets5 (>= 5.7.0) but 5.5.1+dfsg-16ubuntu7.5 is to be installed
                  Depends: libqt5x11extras5 (>= 5.6.0) but 5.5.1-3build1 is to be installed
                  Depends: libvpx4 (>= 1.6.0) but it is not installable

I receive the same error with or without the -f switch in the command. Additionally, for some background information... I had successfully installed and used VirtualBox 5.0 from the package manager for about a week or so. All of the sudden I started having WiFi issues which I eventually was able to resolve - corrupt files in resolve.conf or something like that that had to be updated.

After resolving that, VirtualBox would start freezing on me every time I booted a VM. The solutions that I found suggested removing 5.0 and installing 5.2. I did that and eventually I'm here.

  • What repos are you pointing to? My default repos, apt-cache madison virtualbox only shows 5.0.40 and 5.0.18 available... – ivanivan Feb 6 '18 at 18:34
  • Thanks for your response @ivanivan. Pardon my noob ignorance, but I'm not 100% how to answer that for you. What I can say though is my resolve.conf file contains the following two lines.. the second of which VirtualBox's install instructions told me to add... 1:#deb cdrom:[Linux Mint 18.3 _Sylvia_ - Release amd64 20171124]/ xenial contrib main non-free 2:deb http://download.virtualbox.org/virtualbox/debian zesty contrib – reelnoncents Feb 6 '18 at 20:03
  • Additionally, your command above returns the following result: $ apt-cache madison virtualbox virtualbox | 5.0.40-dfsg-0ubuntu1.16.04.2 | http://cosmos.cites.illinois.edu/pub/ubuntu xenial-updates/multiverse amd64 Packages virtualbox | 5.0.18-dfsg-2build1 | http://cosmos.cites.illinois.edu/pub/ubuntu xenial/multiverse amd64 Packages – reelnoncents Feb 6 '18 at 20:04
  • Your Ubuntu core (of Mint) is xenial but you are trying to use sources from 2 releases later. You are heading for a world of hurt if you continue down this path. If you must have a newer-than-5.0.40 version of VB, then either upgrade your distro or use an alternative install (not the package manager!) – ivanivan Feb 6 '18 at 21:05
  • Great, thanks @ivanivan! I had a feeling it was that but don't know enough to be sure. I don't want to be a bother, but can you provide any further advice? I'd like install 5.2 because apparently a solution for another problem I'm experiencing (Starting up any VM freezes the entire system)... was to completely purge 5.0 and install the newest (5.2). My package manager defaults to 5.0 so I'm following the Linux install instructions on VB's website. Should I restart the install with the Xenial package instead of Zesty? virtualbox.org/wiki/Linux_Downloads – reelnoncents Feb 6 '18 at 23:22
1

The issue is that you are mixing repos for different versions of Ubuntu (yes, you say Mint but Mint is 93.44% Ubuntu... I use Mint, I like it, this isn't a Mint bash!)

The line in your /etc/apt/sources.list that you added -

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

Is referencing a release 2 versions newer than Mint 18.x uses. I've checked the repos, and they do have a package for 5.2 for Mint 18.x (xenial based systems).

So, lets fix your repo list file(s), get them pointed in the right way using Mint style organization, and get you fixed up -

First, the /etc/apt/sources.list should only contain a reference to the install disc, and it should be commented out.

Then, under /etc/apt/sources.list.d you should have a file official-package-repositories.list that only contains the official repositories -

deb http://packages.linuxmint.com/ serena main upstream import backport #id:linuxmint_main
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner

Now as root (I use sudo -i ...), under /etc/apt/sources.list.d create a file called virtualbox-xenial.list and in it put the line

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

And give a few blank lines after, and save and exit.

Next, install the VirtualBox repository signing key.

wget -q -O- http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | apt-key add -

Now, when you apt-get update or apt update or ... it will check the proper VirtualBox hosted repos for Mint 18.x compatible packages. Now the apt-cache search virtualbox should return quite a few more versions available - including 5.2. Install via apt-get install virtualbox-5.2.
If it is anything like the regular Mint/Ubuntu package, you'll want the virtualbox-dkms and virtualbox-qt packages, and it may not show in your Main Mint Menu until you log out and log back in.

|improve this answer|||||
  • Thank you so much @ivanivan for taking so much time to help a noob like me work this out step by step! You are a God of Gods, and your help and generosity are much appreciated! Sadly, I must be a piss poor student. Everything was going great until I tried to install virtualbox-dkms and virtualbox-qt. I'd hate to request anything more of you @ivanivan, but I'm going to post my [hopefully last] issue in case you or others would like to experiment with more troubleshooting. If there's any way I can help you out, @ivanivan, please reach out! – reelnoncents Feb 7 '18 at 17:31
  • Everything was going great following @ivanivan's instructions above until I tried installing virtualbox-dkms and virtualbox-qt... – reelnoncents Feb 7 '18 at 17:32
  • $ sudo apt-get install virtualbox-dkms Reading package lists... Done Building dependency tree Reading state information... Done Recommended packages: virtualbox The following NEW packages will be installed: virtualbox-dkms 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/624 kB of archives. After this operation, 5,053 kB of additional disk space will be used. – reelnoncents Feb 7 '18 at 17:34
  • Selecting previously unselected package virtualbox-dkms. (Reading database ... 244068 files and directories currently installed.) Preparing to unpack .../virtualbox-dkms_5.0.40-dfsg-0ubuntu1.16.04.2_all.deb ... Unpacking virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.2) ... Setting up virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.2) ... Loading new virtualbox-5.0.40 DKMS files... First Installation: checking all kernels... Building only for 4.13.0-32-generic Building initial module for 4.13.0-32-generic Done. – reelnoncents Feb 7 '18 at 17:35
  • vboxdrv: Running module version sanity check. Error! Module version 5.0.40_Ubuntu for vboxdrv.ko is not newer than what is already found in kernel 4.13.0-32-generic (5.2.6). You may override by specifying --force. vboxnetadp.ko: Running module version sanity check. Error! Module version 5.0.40_Ubuntu for vboxnetadp.ko is not newer than what is already found in kernel 4.13.0-32-generic (5.2.6). You may override by specifying --force. – reelnoncents Feb 7 '18 at 17:36
1

Try apt install -f (on its own).

Also I think the package you should try to install is virtualbox not virtualbox-5.2

Additionally, have you tried apt update && apt upgrade before installing ?

|improve this answer|||||
  • I did previously run apt install -f on its own. But I ran it again and here are the results... computername ~ $ apt install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Additionally, I thought I had run those commands before installing but I believe I ran apt-get update && apt-get upgrade instead. After running simply apt update, the terminal told me I had 1 package to be upgraded. Additionally, that 1 package has apparently 2 versions.. – reelnoncents Feb 6 '18 at 19:46
  • ... $ apt update Reading state information... Done 1 package can be upgraded. Run 'apt list --upgradable' to see it $ apt list --upgradable Listing... Done adobe-flashplugin/xenial 1:20180206.1-0ubuntu0.16.04.1 amd64 [upgradable from: 1:20180109.1-0ubuntu0.16.04.1] N: There is 1 additional version. Please use the '-a' switch to see it – reelnoncents Feb 6 '18 at 19:50
  • $ apt list --upgradable -a Listing... Done adobe-flashplugin/xenial 1:20180206.1-0ubuntu0.16.04.1 amd64 [upgradable from: 1:20180109.1-0ubuntu0.16.04.1] adobe-flashplugin/now 1:20180109.1-0ubuntu0.16.04.1 amd64 [installed,upgradable to: 1:20180206.1-0ubuntu0.16.04.1] – reelnoncents Feb 6 '18 at 19:50

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.