Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to install virtualbox. But when I run dpkg -i {dpkg package} I get following error:

sudo dpkg -i virtualbox-4.1_4.1.18-78361~Ubuntu~precise_amd64.deb 
Selecting previously unselected package virtualbox-4.1.
(Reading database ... 245018 files and directories currently installed.)
Unpacking virtualbox-4.1 (from virtualbox-4.1_4.1.18-78361~Ubuntu~precise_amd64.deb) ...
Setting up virtualbox-4.1 (4.1.18-78361~Ubuntu~precise) ...
Adding group `vboxusers' (GID 124) ...
 * Stopping VirtualBox kernel modules                                                                                                                        [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                                                                                                       [ OK ] 
 * Trying to register the VirtualBox kernel modules using DKMS                                                                                                  Error! Bad return status for module build on kernel: 3.11.0-12-generic (x86_64)
Consult /var/lib/dkms/vboxhost/4.1.18/build/make.log for more information.

 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                                                                                                        
 * Look at /var/log/vbox-install.log to find out what went wrong

In vbox-installation.log I have this:

CC [M]  /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: error: ‘VM_RESERVED’ undeclared (first use in this function)
                 vma->vm_flags |= VM_RESERVED; /* This flag helps making 100% sure some bad stuff wont happen (swap, core, ++). */
/var/lib/dkms/vboxhost/4.1.18/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/vboxhost/4.1.18/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/4.1.18/build] Error 2
make: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'

I did sudo apt-get install build-essential linux-headers-uname -r but the problem still exist. Thanks for all answers

share|improve this question
Virtualbox 4.1.18 is from 2012, but linux 3.11.0 is from 2013, so it's not surprising that virtualbox's kernel source might not compile. Can you run a more recent version of virtualbox? I see there's a version 4.3.12 with a package for precise dated May 16 of this year in download.virtualbox.org/virtualbox/4.3.12/… and presumably that will work with the kernel that came with the latest version of precise. –  Mark Plotnick Jun 3 at 0:05
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.