Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed the 3.5 kernel under Ubuntu 12.04. When I install virtualbox I recieve the following error.

Setting up virtualbox (4.1.12-dfsg-2ubuntu0.2) ...
 * Stopping VirtualBox kernel modules                                                              [ OK ] 
 * Starting VirtualBox kernel modules                                                                      
 * No suitable module for running kernel found
                                                                                                   [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Processing triggers for python-central ...
Setting up virtualbox-dkms (4.1.12-dfsg-2ubuntu0.2) ...
Loading new virtualbox-4.1.12 DKMS files...
First Installation: checking all kernels...
Building only for 3.5.0-18-generic
Building initial module for 3.5.0-18-generic
Error! Bad return status for module build on kernel: 3.5.0-18-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.12/build/make.log for more information.
 * Stopping VirtualBox kernel modules                                                              [ OK ] 
 * Starting VirtualBox kernel modules                                                                      
 * No suitable module for running kernel found
                                                                                                   [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.1.12-dfsg-2ubuntu0.2) ...

Does anyone know how I might be able to resolve this?

Edit -- Here is the make.log

DKMS make.log for virtualbox-4.1.12 for kernel 3.5.0-18-generic (x86_64)
Mon Nov 19 12:12:23 EST 2012
make: Entering directory `/usr/src/linux-headers-3.5.0-18-generic'
  LD      /var/lib/dkms/virtualbox/4.1.12/build/built-in.o
  LD      /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
  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 ‘rtR0MemObjLinuxDoMmap’:
/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function ‘do_mmap’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
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.5.0-18-generic'
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

This is a known bug in VirtualBox: additions will not compile with 3.5 kernels. You will need to update VirtualBox to, at least, version 4.1.20, where it's solved.

Some people in the VB forums reported success running 4.1.20 additions on 4.1.18 VirtualBox, but it looks quite a risky and untested idea to me.

share|improve this answer
    
I ended up pulling down the latest version from their site instead of using the apt repo version. The latest version worked without issue. –  kas Nov 26 '12 at 19:32
    
There is also a bug open in Launchpad #1127101 –  Paradiesstaub Feb 26 '13 at 0:01
add comment

Try to use this repo:

sudo add-apt-repository ppa:debfx/virtualbox &&\
sudo apt-get update &&\
sudo apt-get install virtualbox

That solved the problem for me.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.