Ubuntu: Can't run vagrant up


I got an error when running vagrant up

The provider 'virtualbox' that was requested to back the machine  'booking_machine' is reporting that it isn't usable on this system. The  reason is shown below:    VirtualBox is complaining that the kernel module is not loaded. Please  run `VBoxManage --version` or open the VirtualBox GUI to see the error  message which should contain instructions on how to fix this error.  

Then I run command VBoxManage --version. Here is the output

WARNING: The vboxdrv kernel module is not loaded. Either there is no module           available for the current kernel (4.13.0-32-generic) or it failed to           load. Please recompile the kernel module and install it by               sudo /sbin/vboxconfig             You will not be able to start VMs until this problem is fixed.  

Tried sudo /sbin/vboxconfig, but still got error

vboxdrv.sh: Stopping VirtualBox services.  vboxdrv.sh: Building VirtualBox kernel modules.  vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.    There were problems setting up VirtualBox.  To re-start the set-up process, run    /sbin/vboxconfig  as root.  

Part of the output of /var/log/vbox-install.log

make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/4.8.0-41-generic/build -j2 modules  make[1]: warning: -jN forced in submake: disabling jobserver mode.  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 /usr/lib/gcc/x86_64-linux-gnu/5/include  -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=ke  


I remember having similar issues when switching between different kernels on my distro. The only solution that worked for me to reinstall virtualbox

sudo apt install virtualbox  

AFAIR The reinstallation would trigger reconfiguration and should end up with proper modules (maybe restart would be required)


Found, how to fix that. I have to intall the latest version of vagrant and virtualbox. Both!!!

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »