my Ubuntu 12.04 LTS (running in a VirtualBox on an Windows 7 PC) just updated to kernel 3.8.0-31.

After that I tried to install the vitualbox-guest-additions, but this failed with an error, that no suitable module for the running kernel was found.

The make.log said something like: 
CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: error: ‘VM_RESERVED’ undeclared (first use in this function)
/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/virtualbox/4.1.12/build] Error 2
make: Leaving directory `/usr/src/linux-headers-3.8.0-31-generic'

What can I do?


The kernel header package for the running kernel is required to install VirtualBox guest additions (build the dkms module).

To fix the problem, install the kernel header for 3.8.0-31-generic and build-essential packages.

sudo apt-get install linux-headers-$(uname -r) build-essential

Mount the Guest Additions ISO (if no X) and install the guest addition by running the install script

mount /dev/cdrom /media
cd /media
| improve this answer | |

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.