I'm trying to install virtualbox in my fresh install lubuntu 16.04 but, it gets the following error:

anonprophet@anonbook:~/Downloads$ sudo dpkg -i virtualbox-5.0_5.0.20-106931-Ubuntu-xenial_amd64.deb 
[sudo] password for anonprophet: 
(Reading database ... 155035 files and directories currently installed.)
Preparing to unpack virtualbox-5.0_5.0.20-106931-Ubuntu-xenial_amd64.deb ...
Unpacking virtualbox-5.0 (5.0.20-106931~Ubuntu~xenial) over (5.0.20-106931~Ubuntu~xenial) ...
Setting up virtualbox-5.0 (5.0.20-106931~Ubuntu~xenial) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Stopping VirtualBox kernel modules ...done.
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...

this log from /var/log/vbox-install.log

arch/x86/Makefile:133: stack-protector enabled but compiler support broken
arch/x86/Makefile:148: CONFIG_X86_X32 enabled but no binutils support
Makefile:670: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-str$
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$
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it$
echo >&2 ;                                                      \
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./arc$
/bin/sh: 1: gcc: not found
scripts/Makefile.build:258: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o$
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127
Makefile:1396: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:298: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2

I can't run vagrant box, because this virtualbox "VirtualBox is complaining that the kernel module is not loaded."

  • Did you ever solve this? I'm using Ubuntu with the latest RC kernel and I'm getting this exact problem. Installed kernel from .deb files. Can't run vagrant. The answer below doesn't seem like it has anything to do with the problem we're having Jan 16, 2017 at 9:22

1 Answer 1


you should install dkms and build tools. dpkg doesn't install dependencies for you, so I would say that it's a bad idea to use it to install debian packages by itself.

Sometimes, it's easier to just have apt-get fix the problem that you created, which installs missing dependencies after you ran dpk -i. Then, remove and reinstall the virtualbox 5 package:

$ sudo apt-get -f install
$ dpkg -r virtualbox*.deb
$ dpkg -i virtualbox*.deb

The default virtualbox package requires many dependencies. First, list the dependencies of the package you downloaded and then install them using apt-get:

$ dpkg -I virtualbox*.deb
$ sudo apt-get install dkms linux-header-generic ...

Then, you can proceed to install the package.

$ sudo dpkg -i  virtualbox*.deb

I suggest you use a PPA instead of using dpkg. (https://linuxpropaganda.wordpress.com/2016/07/07/install-virtualbox-from-ppa-in-xubuntu-16-04/)

$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" >> /etc/apt/sources.list.d/virtualbox.list' 
$ sudo apt-get update
$ sudo apt-get install virtualbox-5.2

You must log in to answer this question.

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