4

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.
------------------------------
Done.
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:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
5
  • 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 Feb 12, 2013 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, 2013 at 10:58
  • So this is as a result of sudo apt-get upgrade? Feb 12, 2013 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 pastebin.ubuntu.com and put the link into your question.
    – guntbert
    Feb 12, 2013 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, 2013 at 19:37

2 Answers 2

3

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..!!

1
  • 1
    Must it be 4.6? On my machine /usr/bin/gcc is already symlinked to gcc-4.7 Jan 11, 2015 at 22:03
1

You can check the error in the log, in most case it used a gcc/g++ option that not supported in your current version.

You can install a newer version of gcc and g++, and manage with update-alternatives. https://stackoverflow.com/questions/7832892/how-to-change-the-default-gcc-compiler-in-ubuntu

After that reinstall virtualbox-dkms.

 sudo apt-get --reinstall install virtualbox-dkms

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .