28

After the 14.10 update to VirtualBox, I can no longer run my boxes. Of note, running sudo service virtualbox status returns VirtualBox kernel module is not loaded and running sudo service virtualbox restart shows:

 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Starting VirtualBox kernel modules                                            
 * No suitable module for running kernel found
                                                                         [fail]

The VirtualBox GUI, when I try to run a box, pops up a dialog saying that I should run sudo /etc/init.d/vboxdrv setup, but there is no /etc/init.d/vboxdrv on my 14.10 installation.

This is reminiscent of this question. Per some of the answers, I tried uninstalling (with purge) and reinstalling VirtualBox. This did not help. However, I was unable to install:

linux-headers-`uname -r`

because there is no package named linux-headers-3.13.0-30-generic. I do have linux-headers-generic and linux-source installed, as well as dkms, but the reinstall still fails:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  vde2
The following NEW packages will be installed:
  virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.1 MB of archives.
After this operation, 87.6 MB of additional disk space will be used.
Selecting previously unselected package virtualbox.
(Reading database ... 253183 files and directories currently installed.)
Preparing to unpack .../virtualbox_4.3.18-dfsg-2ubuntu1_amd64.deb ...
Unpacking virtualbox (4.3.18-dfsg-2ubuntu1) ...
Selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../virtualbox-dkms_4.3.18-dfsg-2ubuntu1_all.deb ...
Unpacking virtualbox-dkms (4.3.18-dfsg-2ubuntu1) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_4.3.18-dfsg-2ubuntu1_amd64.deb ...
Unpacking virtualbox-qt (4.3.18-dfsg-2ubuntu1) ...
Processing triggers for man-db (2.7.0.2-2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.10.20140925-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu2) ...
Processing triggers for mime-support (3.55ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Setting up virtualbox (4.3.18-dfsg-2ubuntu1) ...
 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Starting VirtualBox kernel modules                                            
 * No suitable module for running kernel found
                                                                         [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up virtualbox-dkms (4.3.18-dfsg-2ubuntu1) ...
Loading new virtualbox-4.3.18 DKMS files...
First Installation: checking all kernels...
Building only for 3.13.0-30-generic
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Starting VirtualBox kernel modules                                            
 * No suitable module for running kernel found
                                                                         [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.3.18-dfsg-2ubuntu1) ...
Processing triggers for menu (2.1.47ubuntu1) ...

So... how do I get "kernel source for this kernel" (3.13.0-30-generic) or otherwise get VirtualBox to install properly?

  • Wait, that doesn't sound right. You say Ubuntu 14.10 (Utopic Unicorn) and Kernel 3.13.0-30? I run 14.04 and got 3.13.0-45. Could you please post the output of lsb_release -a and uname -r? Also, have you done a sudo apt-get update and sudo apt-get dist-ugprade? -- Edit: 3.16.0-30 should be current – Benjamin Maurer Feb 5 '15 at 19:00
  • @BenjaminMaurer: lsb_release -a says "No LSB modules are available", then has information from 14.10. uname -r reports 3.13.0-30-generic. I just did a sudo apt-get update and sudo apt-get upgrade as part of trying to work this out. sudo apt-get dist-upgrade reports nothing to do. Note that this machine had 14.04 on it until a week or so ago, when I upgraded to 14.10. I saw the 3.16.0-30 when I poked around the Ubuntu site, but I'm not sure why I'm not seeing it with apt-get. Thanks! – CommonsWare Feb 5 '15 at 19:08
  • That's weird... Please check /etc/apt/sources.list It shouldn't say "trusty" anywhere, but "utopic" – Benjamin Maurer Feb 5 '15 at 19:17
  • @BenjaminMaurer: The only two trusty references are commented-out references to the nginx-devel PPA. Bizzarely, Synaptic reports that linux-image-generic is not installed, and that installing it would install linux-image-3.16.0.30-generic. My guess is that I need to do that, as it didn't take effect in Trusty->Utopic upgrade for some reason. Thoughts? Thanks! – CommonsWare Feb 5 '15 at 19:22
  • Hm. To be honest, I've never done an upgrade, always fresh install out of fear of broken packages... Upgrades are a nightmare... I can only tell you, that I've got linux-generic, linux-image-generic, linux-headers-generic` and linux-signed-generic all installed on my system. – Benjamin Maurer Feb 5 '15 at 19:26
25

It seems like your upgrade from Ubuntu 14.04 to 14.10 broke something. You should have kernel version 3.16.0-30

Make sure that your /etc/apt/sources.list only contains entries with 'utopic' and not 'trusty'. Then make sure that following packages are installed, or install them if necessary:

apt-get install linux-generic linux-image-generic linux-headers-generic linux-signed-generic

After that you should be able to remove and re-install virtualbox and rebuild the kernel module.

  • didn't work for me :( mint cinnamon 17.2 64bit kernel 3.16.0-38-generic. any idea? – Sepehr Behroozi Sep 5 '15 at 13:01
  • 2
    Well, do you have the same issue at all? Have you done everything that OP has done? Is the service running, i.e. sudo service virtualbox status ? Have you tried rebuilding the module with sudo dkms autoinstall ? – Benjamin Maurer Sep 5 '15 at 18:16
  • Worked like a charm.... – vaibhav jain Oct 8 '15 at 7:52
  • 1
    Yep --- another case of askubuntu.com/questions/449905/… --- sometime the upgrade "lags" the kernel version. – Rmano Oct 8 '15 at 7:59
14

For those who might have same problem:

My system is Linux Mint 17.1 (which uses Ubuntu 14.04 Trusty repos).

I've tried to install VirtualBox with:

sudo apt-get install virtualbox

And eccountered same error.

Solution:

Uninstall bad version of VirtualBox with:

sudo apt-get purge virtualbox

Then get installer from https://www.virtualbox.org/wiki/Linux_Downloads and install deb package. Is says same version is in your repositories... but that way it works.

  • 1
    I couldn't get the apt packaged version to work with Mint 17.2 but this worked - thanks. – Richard Hollis Sep 19 '15 at 11:13
  • Thanks for this, it worked for me. FWIW, at this moment the version on the virtualbox site is newer than the one in the repos, so a warning will be displayed. I think it is safe to ignore it, and the installation indeed works. I'm quite sure that the package in the repo is broken. – Tamás Szelei Jan 2 '16 at 15:04
4

I always found that "remove & reinstall" so windows-esque... I solved with sudo dpkg-reconfigure virtualbox-dkms (of course, if you didn't install it yet, you can use sudo apt install virtualbox-dkms)

0

I just upgraded an old Ubuntu LTS system from 12.04 Precise Pangolin to 14.04 Trusty Tahr, and a combination of hints in the comments here were required to get virtualbox working.

Step 0: Try and install virtualbox via sudo apt-get install virtualbox. It mostly worked, but at the end I got the "No suitable module for running kernel" error. sudo modprobe vboxdrv failed because there was no such module.

So, the fix:

Step 1: sudo apt-get install linux-generic linux-image-generic linux-headers-generic linux-signed-generic. apt-get said that the first two were already installed, and installed the 3rd and 4th.

Step 2: uninstall and reinstall virtualbox. sudo apt-get purge virtualbox and then sudo apt-get install virtualbox. This time, the virtualbox installer compiled a kernel module for the generic kernel. Woo hoo!

At this point, virtualbox still didn't work.

Step 3: Reboot.

Now, sudo modprobe vboxdrv works, and I can start a VM.

  • 1
    This did not work for me on Ubuntu 12.04.5 LTS. sudo modprobe vboxdrv returns "FATAL: Module vboxdrv not found." – Luke Jul 22 '16 at 20:18

protected by Community Sep 21 '15 at 11:36

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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