Page 1 of 1

Debian 9 Stretch RC2 hosting VirtualBox 5.1.18-114002

Posted: 20. Mar 2017, 00:36
by jarosm3
Hello to all,
after fresh installation of Debian 9 Stretch RC2 I tried to install VirtualBox 5.1.18:

Code: Select all

sudo apt-get install virtualbox
The installation failed during validation script /usr/lib/virtualbox/check_module_dependencies.sh:

Code: Select all

This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
apt-get install linux-headers-4.9.0-1-amd64
Also /var/log/vbox-install.log contained following line:

Code: Select all

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Because package linux-headers-4.9.0-1-amd64 cannot be installed (there's only version 4.9.0-2 in debian packages), I had tried to install apt-get install linux-headers-4.9.0-2-amd64.

It didn't work - verification script checks version via uname -r and it returned kernel version 4.9.0-1-amd64 vs. 4.9.0-2-amd64 headers on the file system.

Solution:
Finally I've upgraded kernel version from 4.9.0-1-amd64 to 4.9.0-2-amd64 (I had fresh installation - nothing to lose) and it worked.

MJ.

Re: Debian 9 Stretch RC2 hosting VirtualBox 5.1.18-114002

Posted: 24. Mar 2017, 17:53
by frank
Which repository did you use? If you really used the Oracle one then I doubt that you did apt-get install virtualbox -- I rather think you installed virtualbox-5.1. Is that correct?

As for your report of the wrong guess of the check_module_dependencies.sh script: It's really hard to guess the correct name on all relevant Linux distributions. In general keep in mind that you need to install the package which can be used to build kernel modules for the current running Linux kernel. How this package is named is not 100% certain.