Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

world. I'm trying to upgrade my system but I get the error:

Error! Bad return status for module build on kernel: 3.2.0-37-generic (i686)

Deleting module version: 4.1.12
completely from the DKMS tree.
Loading new virtualbox-4.1.12 DKMS files...
First Installation: checking all kernels...
Building only for 3.2.0-37-generic
Building initial module for 3.2.0-37-generic
Error! Bad return status for module build on kernel: 3.2.0-37-generic (i686)
Consult /var/lib/dkms/virtualbox/4.1.12/build/make.log for more information.
dpkg: error processing virtualbox-dkms (--configure):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
What exactly are you trying to upgrade? Ubuntu? Upgrading the entire OS to 12.10 or just upgrading the packages on your current Ubuntu? Or are you trying to upgrade only VirtualBox? etc – Nathan J. Brauer Feb 12 '13 at 10:39
I just want to update the system. that error I get it since I made the last update. – X_o Feb 12 '13 at 10:58
So this is as a result of sudo apt-get upgrade? – Nathan J. Brauer Feb 12 '13 at 12:01
Did you look into /var/lib/dkms/virtualbox/4.1.12/build/make.log like the error message suggested? You can edit your question to post it or (if it is too big) use and put the link into your question. – guntbert Feb 12 '13 at 17:22
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 Unable to exec gcc.real: No such file or directory make[2]: *** [/var/lib/dkms/virtualbox/4.1.12/build/vboxdrv/linux/SUPDrv-linux.o] Error 2 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.2.0-37-generic' – X_o Feb 12 '13 at 19:37

1.) sudo apt-get remove virtualbox

2.) reboot

3.) sudo ln -si /usr/bin/gcc-4.6 /usr/bin/gcc

4.) reboot

4.) sudo apt-get install virtualbox

5.) optional reboot. :)

that all kids..!!

share|improve this answer
Must it be 4.6? On my machine /usr/bin/gcc is already symlinked to gcc-4.7 – David Millar Jan 11 '15 at 22:03

Your Answer


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.