1

I'm trying to install VirtualBox on Lubuntu 15.04 and I'm running into a problem with it.

When I run VBoxManage --version I get the output:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.19.0-16-generic) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.
4.3.26r98988

Running sudo /etc/init.d/vboxdrv setup gives the following output:

Stopping VirtualBox kernel modules ...done.
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)

The contents of the log are as follows:

make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.19.0-16-generic/build modules
arch/x86/Makefile:114: stack-protector enabled but compiler support broken
arch/x86/Makefile:129: CONFIG_X86_X32 enabled but no binutils support
Makefile:669: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: gcc: Command not found
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem   -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -O2 -fstack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/3.19.0-16-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
/bin/sh: 1: gcc: not found
scripts/Makefile.build:257: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127
Makefile:1394: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:289: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2

1 Answer 1

2

Your error indicates that gcc - the GNU C Compiler - is not present on your system. To get it, you should install build-essential which is a meta package which will pull in the compiler and most of the standard libraries it needs for compiling things as dependencies.

Run this command to install it: sudo apt-get install build-essential

4
  • Thank you for this. I had noticed that I don't appear to have GCC installed but was paralysed to try anything without knowing exactly the right way about it. Seems like this solved everything!
    – Jonathan
    May 12, 2015 at 14:31
  • @defaye if it works, then you can select this as the answer when the system permits you to. It's never good to leave questions marked 'unanswered' :P
    – Thomas Ward
    May 12, 2015 at 14:32
  • Dude, I'm not a beginner on stack exchange. You asked for the accept before I could do so, up to a minute before. Calm down. Thanks though. Not knowing/remembering the right way to acquire gcc helped a lot.
    – Jonathan
    May 12, 2015 at 14:37
  • @defaye that's a canned comment, sorry. No offense meant :)
    – Thomas Ward
    May 12, 2015 at 14:42

You must log in to answer this question.

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