Installing virtualbox-5.0_5.0.20-106931-Debian-jessie_amd64.deb from virtualbox site
system is Debian 8 (Jessie).
Kernel: Linux Shuttle-Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Installed headers:
ii linux-headers-3.16.0-4-all 3.16.7-ckt25-2 amd64 All header files for Linux 3.16 (meta-package)
ii linux-headers-3.16.0-4-all-amd64 3.16.7-ckt25-2 amd64 All header files for Linux 3.16 (meta-package)
ii linux-headers-3.16.0-4-amd64 3.16.7-ckt25-2 amd64 Header files for Linux 3.16.0-4-amd64
ii linux-headers-3.16.0-4-common 3.16.7-ckt25-2 amd64 Common header files for Linux 3.16.0-4
ii linux-headers-amd64 3.16+63 amd64 Header files for Linux amd64 configuration (meta-package)
dkms is installed:
ii dkms 2.2.0.3-2 all Dynamic Kernel Module Support Framework
Initial install from GDebi Installer:
Selecting previously unselected package virtualbox-5.0.
(Reading database ... 225185 files and directories currently installed.)
Preparing to unpack .../virtualbox-5.0_5.0.20-106931-Debian-jessie_amd64.deb ...
Unpacking virtualbox-5.0 (5.0.20-106931~Debian~jessie) ...
Setting up virtualbox-5.0 (5.0.20-106931~Debian~jessie) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 3.16.0-4-amd64 cannot be found.
Please install the linux-headers-3.16.0-4-amd64 package,
or use the --kernelsourcedir option to tell DKMS where it's located
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
Processing triggers for systemd (215-17+deb8u4) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.3-1) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
from /var/log/vbox-install.log:
Uninstalling modules from DKMS
removing old DKMS module vboxhost version 5.0.20
------------------------------
Deleting module version: 5.0.20
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxhost/5.0.20/source ->
/usr/src/vboxhost-5.0.20
DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:203: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL=<directory> and run Make again. Stop.
running 'sudo /sbin/rcvboxdrv setup' gives the same result in /var/log/vbox-install.log
Obviously I'm missing something basic but no clue as to what it is.
Do I need to create a symlink from somewhere to point to the headers? I'm not familiar enough with install scripts to point dkms to the headers as installed.
Thanks for any assistance.
[SOLVED} Debian Jessie: kernel modules fail to compile/install
[SOLVED} Debian Jessie: kernel modules fail to compile/install
Last edited by k6mr on 11. Jun 2016, 01:17, edited 1 time in total.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Debian Jessie: kernel modules fail to compile/install
Not if you have the matching headers for your kernel. I noticed that you have a custom kernel of sorts. You can try the following:Do I need to create a symlink from somewhere to point to the headers
sudo apt-get install linux-headers-$(uname -r) and see if it helps.
Re: Debian Jessie: kernel modules fail to compile/install
Thanks for the reply. The kernel is as provided by the update process, I have not built it locally. This is a reasonably new installation (within the last 3 months or so) and I updated using Synaptic before attempting the install.
Results of 'sudo apt-get install linux-headers-$(uname -r)'
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.16.0-4-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I 'think' I may have tried this before but it never hurts to try again.
I know I've installed VB on other LInux hosts without a problem, so this is puzzling.
Thanks.
Results of 'sudo apt-get install linux-headers-$(uname -r)'
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.16.0-4-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I 'think' I may have tried this before but it never hurts to try again.
I know I've installed VB on other LInux hosts without a problem, so this is puzzling.
Thanks.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Debian Jessie: kernel modules fail to compile/install
Well you posted the above and that is for sure not a default kernel for Debian AFAIK.Kernel: Linux Shuttle-Linux 3.16.0-4-amd64
What does uname -a show?
Mine shows Linux debian-8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux
Re: Debian Jessie: kernel modules fail to compile/install
uname -a
Linux Shuttle-Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Your kernel is over a year old so that likely explains the version difference. This is a recent installation.
When I look in Synaptic it shows 3.16.7-ckt25-2 as the latest version of both image and headers. Version numbers aside, it would seem that as long as I have matching image/header release/version there should not be a problem. But since dkms can't find the headers there's something else it is looking for.
I'm using the recommended repositories so I don't think I picked up a bogus kernel. I'm still thinking that something in dkms is not configured correctly but that's starting to get way beyond my knowledge.
Thanks.
Linux Shuttle-Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Your kernel is over a year old so that likely explains the version difference. This is a recent installation.
When I look in Synaptic it shows 3.16.7-ckt25-2 as the latest version of both image and headers. Version numbers aside, it would seem that as long as I have matching image/header release/version there should not be a problem. But since dkms can't find the headers there's something else it is looking for.
I'm using the recommended repositories so I don't think I picked up a bogus kernel. I'm still thinking that something in dkms is not configured correctly but that's starting to get way beyond my knowledge.
Thanks.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Debian Jessie: kernel modules fail to compile/install
Yours
Linux Shuttle-Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Mine
Linux debian-8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux
I am not all that concerned with the version number it is the kernel name ( in red above ). When you say the repository what do you mean exactly? The Debian repository, or the virtualbox.org one?
Also the headers that you use from Debian probably will not work for the Shuttle-Linux one and why it can not be found. So the real question is where did you get that kernel?
Linux Shuttle-Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Mine
Linux debian-8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux
I am not all that concerned with the version number it is the kernel name ( in red above ). When you say the repository what do you mean exactly? The Debian repository, or the virtualbox.org one?
Also the headers that you use from Debian probably will not work for the Shuttle-Linux one and why it can not be found. So the real question is where did you get that kernel?
Re: [SOLVED} Debian Jessie: kernel modules fail to compile/install
'Shuttle-Linux' is the nodename of the system. It has nothing to do with the kernel release/version. You can get the nodename from uname with option -n .
I found a workaround, although I'm still don't understand why things are the way they are:
dkms manpage says that dkms looks in '/lib/modules/$kernel_version/build' for the headers. That directory was empty on my system. The header files are in 'usr/src/linux-headers-3.16.0-4-amd64'
So I deleted the 'build' directory and created a symlink named 'build' to the headers directory in /usr/src/ Kernel modules built fine.
They say don't argue with success but it bugs me when things are not as they say they should be. This is the first "official" Debian system I've used so maybe I missed something in setup/config.
I found a workaround, although I'm still don't understand why things are the way they are:
dkms manpage says that dkms looks in '/lib/modules/$kernel_version/build' for the headers. That directory was empty on my system. The header files are in 'usr/src/linux-headers-3.16.0-4-amd64'
So I deleted the 'build' directory and created a symlink named 'build' to the headers directory in /usr/src/ Kernel modules built fine.
They say don't argue with success but it bugs me when things are not as they say they should be. This is the first "official" Debian system I've used so maybe I missed something in setup/config.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [SOLVED} Debian Jessie: kernel modules fail to compile/install
Yes you are right. I got fixated on a ruse. It's been a long week, sorry. I can tell you that my headers are in /usr/src and I have dkms installed as well, but do not have problems with building kernel modules. I do remember having and issue years ago and as it turned out it was dkms that had become corrupted and all I needed to do was purge and install dkms again. Not sure if that will fix your problem but I have never had to create a symlink to get it to work properly.