[SOLVED] After upgrading to kernel 3.8 module-assistant can't find kernel headers (Debian Sid)
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After upgrading to kernel 3.8 module-assistant can't find kernel headers (Debian Sid)
Hi folks,
I'm using Debian Sid and a few days ago I upgraded to kernel 3.8 (from the official Debian repositories). The point is, after this upgrade, module-assistant can't find the kernel headers, even though they are installed. If for example, I try to compile virtualbox I get this:
Code:
# m-a -t a-i virtualbox
.
Updated infos about 1 packages
Getting source for kernel version: 3.8-1-amd64
apt-get install linux-headers-3.8-1-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.8-1-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Done!
Bad luck, the kernel headers for the target kernel version could not be found and you did not specify other valid kernel headers to use.
However, you can install the header files for your kernel which are provided by the linux-headers-3.8-1-amd64 package. For most modules packages, these files are
perfectly sufficient without having the original kernel source.
To install the package, run:
module-assistant prepare
or
apt-get install linux-headers-3.8-1-amd64
But the kernel headers are installed, as you can see in the following output:
If I specify the kernel-headers directory when invoking module-assistant, it throws this error:
Code:
# m-a --kernel-dir /usr/src/linux-headers-3.8-1-amd64 a-i virtualbox
Updated infos about 1 packages
Bad kernel version specification at /usr/bin/m-a line 568, <$apt> line 7.
This is the output of uname -a, just in case:
Code:
# uname -a
Linux debian 3.8-1-amd64 #1 SMP Debian 3.8.12-1 x86_64 GNU/Linux
I just found this related bug report for the same version of module-assistant I'm using, but I'm not sure about how to apply the patch (and whether or not it will fix this issue). Does anyone one know how to apply this patch?
I followed the steps you suggested, and everything seems to go fine but when I get to the dpkg-buildpackage -rfakeroot -us -uc command, I get long output that eventually ends in the following error:
Code:
nsgmls:I: maximum number of errors (200) reached; change with -E option
Can't call method "value" on an undefined value at /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl line 249, <STDIN> line 1.
make[1]: *** [module-assistant.8] Error 8
make[1]: Leaving directory `/home/vicente/Desktop/ma/module-assistant-0.11.4'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-indep] Error 2
dpkg-buildpackage: fallo: debian/rules build devolvió un estado de salida de error 2
The translation of the last line is pretty much this: "dpkg-buildpackage: fail: debian/rules returned an error exit status 2."
Any ideas about what might be wrong? Maybe a problem in the source package itself?
The package that was missing was docbook-to-man (your suggestion to install docbook-utils made me suspect that some other docbook package was missing ). After installing it, I got past the first error, but got other errors which seemed to be caused by a problem in module-assistant itself, so I made these changes and it finally compiled fine.
Now I'm having other problem when building the virtualbox module with module-assistant (not the initial problem, though). Judging from the results of a quick web search, the virtualbox module fails to build against new kernels for some reason. However, I will have to wait before attempting to fix it, since this will be a busy week for me. Anyway I managed to install the nVidia driver from the repositories (didn't know I could do without module-assistant to install the non-free driver from the repos, as I've always used it to build the driver).
@EDDY1: For the record, I only have the 3.8 kernel installed at the moment (which is the one I'm currently using).
Since the initial problem with module-assistant is fixed now, I will mark this thread as solved. Thank you both for your help, folks; much appreciated.
Last edited by Hungry ghost; 05-13-2013 at 11:29 AM.
Well, the last lines of the build log are different to the first error messages I got, which makes me think this is another issue:
Code:
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: error: ‘VM_RESERVED’ undeclared (first use in this function)
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: note: each undeclared identifier is reported only once for each function it appears in
kmk[5]: *** [/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
kmk[5]: *** Waiting for unfinished jobs....
kmk[5]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[5]: Entering directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[5]: *** Exiting with status 2
kmk[4]: *** [/usr/src/modules/virtualbox/vboxdrv] Error 2
kmk[4]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[3]: *** [_module_/usr/src/modules/virtualbox] Error 2
kmk[3]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[2]: *** [sub-make] Error 2
kmk[2]: Leaving directory `/usr/src/linux-headers-3.8-1-common'
kmk[1]: *** [all] Error 2
kmk[1]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk: *** [binary-modules] Error 2
make: *** [kdist_build] Error 2
There's a similar bug report but is related to kernels 3.6 and 3.7, though I suspect it's the same issue since parts of the errors look quite similar. Will try the patch in the link when I have some time this week.
Last edited by Hungry ghost; 05-13-2013 at 07:08 PM.
This is just to let you know that VirtualBox got upgraded with today's updates and now it's working fine again, so the problem seems to be solved. Thanks a lot for your help, caravel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.