简体   繁体   中英

Warning vboxdrv kernel module is not loaded

Well I run this command

aptitude purge ~o

To delete all the Obsoletes files that aptitude show me big mistake I guess after that I update the system everything works fine but when I restart the system and I want to load the virtual machine I got this error

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.14-kali1-amd64) 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.

The program still running but I can't load the virtual machine so I run that command to and the out put was.

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

I am going to post just one part of the file because vbox-install.log have to many lines.

./install.sh: 343: ./install.sh: /etc/init.d/vboxautostart-service: not found
./install.sh: 343: ./install.sh: /etc/init.d/vboxballoonctrl-service: not found
./install.sh: 343: ./install.sh: /etc/init.d/vboxweb-service: not found
VirtualBox 4.3.10 r93012 installer, built 2014-03-26T19:18:38Z.

Testing system setup...
System setup appears correct.

Installing VirtualBox to /opt/VirtualBox

Output from the module build process (the Linux kernel build system) follows:

make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.12-kali1-amd64/build modules
make -C /usr/src/linux-headers-3.12-kali1-amd64 \
    KBUILD_SRC=/usr/src/linux-headers-3.12-kali1-common \
    KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-headers-3.12-kali1-common/Makefile \
    modules
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 /usr/src/linux-headers-3.12-kali1-common/scripts/Makefile.build obj=/tmp/vbox.0

The last part.

make -C /usr/src/linux-headers-3.12-kali1-amd64 \
    KBUILD_SRC=/usr/src/linux-headers-3.12-kali1-common \
    KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-headers-3.12-kali1-common/Makefile \
    modules
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 /usr/src/linux-headers-3.12-kali1-common/scripts/Makefile.build obj=/tmp/vbox.0
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/linux/.VBoxPci-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxPci_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -c -o /tmp/vbox.0/linux/.tmp_VBoxPci-linux.o /tmp/vbox.0/linux/VBoxPci-linux.c
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/.VBoxPci.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxPci)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -c -o /tmp/vbox.0/.tmp_VBoxPci.o /tmp/vbox.0/VBoxPci.c
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/.SUPR0IdcClient.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPR0IdcClient)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -c -o /tmp/vbox.0/.tmp_SUPR0IdcClient.o /tmp/vbox.0/SUPR0IdcClient.c
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/.SUPR0IdcClientComponent.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPR0IdcClientComponent)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -c -o /tmp/vbox.0/.tmp_SUPR0IdcClientComponent.o /tmp/vbox.0/SUPR0IdcClientComponent.c
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/linux/.SUPR0IdcClient-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPR0IdcClient_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -c -o /tmp/vbox.0/linux/.tmp_SUPR0IdcClient-linux.o /tmp/vbox.0/linux/SUPR0IdcClient-linux.c
  ld -m elf_x86_64   -r -o /tmp/vbox.0/vboxpci.o /tmp/vbox.0/linux/VBoxPci-linux.o /tmp/vbox.0/VBoxPci.o /tmp/vbox.0/SUPR0IdcClient.o /tmp/vbox.0/SUPR0IdcClientComponent.o /tmp/vbox.0/linux/SUPR0IdcClient-linux.o 
(cat /dev/null;   echo kernel//tmp/vbox.0/vboxpci.ko;) > /tmp/vbox.0/modules.order
make -f /usr/src/linux-headers-3.12-kali1-common/scripts/Makefile.modpost
  find /tmp/vbox.0/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m  -i /usr/src/linux-headers-3.12-kali1-amd64/Module.symvers -I /tmp/vbox.0/Module.symvers  -o /tmp/vbox.0/Module.symvers -S -w -s -T -
   gcc-4.7 -Wp,-MD,/tmp/vbox.0/.vboxpci.mod.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-headers-3.12-kali1-common/include -Iinclude -I/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-kali1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-kali1-common/include/linux/kconfig.h   -I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h   -I/lib/modules/3.12-kali1-amd64/build/include   -I/tmp/vbox.0/   -I/tmp/vbox.0/include   -I/tmp/vbox.0/r0drv/linux   -I/tmp/vbox.0/vboxpci/   -I/tmp/vbox.0/vboxpci/include   -I/tmp/vbox.0/vboxpci/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxpci.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxpci)" -DMODULE  -c -o /tmp/vbox.0/vboxpci.mod.o /tmp/vbox.0/vboxpci.mod.c
  ld -r -m elf_x86_64 -T /usr/src/linux-headers-3.12-kali1-common/scripts/module-common.lds --build-id  -o /tmp/vbox.0/vboxpci.ko /tmp/vbox.0/vboxpci.o /tmp/vbox.0/vboxpci.mod.o
Starting VirtualBox kernel modules ...done.

End of the output from the Linux kernel build system.
Installation successful
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

thank you very much for any help or comments.

for Ubuntu 15.10 and virtualbox 5.+ use:

sudo /sbin/rcvboxdrv setup

thx: http://www.webupd8.org/2015/10/workaround-for-sbinvboxconfig-not.html

I met the problem:

VBoxManage --version

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

       sudo /sbin/rcvboxdrv setup

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

5.0.24_RPMFusionr108355

After I do

sudo modprobe vboxdrv

Then it works now.

On Arch Linux

sudo pacman -S virtualbox-host-modules-arch

and then

sudo modprobe vboxdrv

对我来说,我对系统进行了更新,然后再次运行sudo /etc/init.d/vboxdrv setup

Run:

sudo /usr/lib/virtualbox/vboxdrv.sh setup

It should fix the issue.

Arch Linux:

sudo pacman -S virtualbox-host-modules-arch

And then you have to reboot. That fixed it for me.

Tring to restart could work on other distrobutions, too.

Select the right version. For me was 3.13-kali1

I think that you are missing something. Try to install

  • linux-headers-3.14-kali1-common
  • linux-headers-3.14-kali1-amd64
  • linux-source-3.14
  • libdw1
  • libunwind7

it worked for me.

Best Regards.

On Debian, try:

sudo apt-get install -f

When all the missing dependencies are resolved, try launching VirtualBox again.

sudo modprobe vboxdrv对我sudo modprobe vboxdrv ,就在我从 bios 菜单禁用安全启动之后。

只需从 bios 禁用安全启动,它对我有用

This guide is what got it working for me: https://gorka.eguileor.com/vbox-vmware-in-secureboot-linux-2016-update/

I am however using Ubuntu 16.04 (I am not sure which distro the guide is using..) and I modified these steps as:

for f in $(dirname $(modinfo -n vboxdrv))/*.ko; do echo "Signing $f"; sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $f; done

becomes:

for f in $(dirname $(modinfo -n vboxdrv))/*.ko; do echo "Signing $f"; sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $f; done


mokutil --import MOK.der

becomes:

sudo mokutil --import MOK.der


Otherwise it got it working for me.

This command worked for me

sudo /etc/init.d/vboxdrv setup

Next I got following error

The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. VirtualBox requires that the same user is used to manage the VM that was created. Please re-run Vagrant with that user. This is not a Vagrant issue. The UID used to create the VM was: 0 Your UID is: 1000

That got solved by running vagrant up command with root access.

this should fix the issue with VirtualBox Version: 5.1

Run these commands to fix.

First one:

uname -r

this will give you, you kernel version exemple : linux kernel 4.16.03

take the 3 first number then run this second command replacing those 416 with your value:

this command is for manjaro linux but you can try to install the package with apt get:

sudo pacman -S linux416-virtualbox-host-modules

the last command to initialise the module:

sudo modprobe vboxdrv

Instead of trying to fix the .deb downloaded from Oracle, I did:

sudo aptitude install virtualbox

and it worked! Well, I had to remove the broken package first. (Ubuntu 18.04 LTS)

After install VirtualBox on ubantu 18.04.3
  • download and install virtualbox-dkms related to your virtualbox version
  • download virtualbox-dkms packages links urls reference

( https://pkgs.org/download/virtualbox-dkms ) OR ( http://ftp.debian.org/debian/pool/contrib/v/virtualbox/ )

after download ig virtualbox-dkms.deb package install using below command

$ sudo dpkg -i virtualbox-dkms.deb

Follow steps in this URL ( http://www.bojankomazec.com/2019/04/how-to-install-virtualbox-on-ubuntu-1804.html )

For Arch Linux:

First step:

pamac install virtualbox $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-virtualbox-host-modules"}' ORS=' ')

next step:

sudo modprobe vboxdrv

sudo apt install -f

then you can run your virtualbox, this command fixed my problem.

When installing VirtualBox to Fedora 36 using conventional methods (adding RPM repository and then installing with dnf ), I ended up with kernel modules with *.ko.xz extension( vboxdrv.ko.xz , vboxnetadp.ko.xz , vboxnetflt.ko.xz ). From what I understand kmods modules were not properly compiled. As a result, when trying to load modules (with modprobe vboxdrv ) I got the following error even though I did sign them correctly.

modprobe: ERROR: could not insert 'vboxdrv': Invalid argument

It seems to be an issue specific to Fedora 36, as I had a similar issue with v4l2loopback module. The solution is not to use the default repository to install and instead download the release .rpm files from official sources and install manually. After manually downloading and installing the resulting kmod modules did not have that .xz extension and did load correctly after signing them.

I simply load the kernel module at boot. As sudo, add the line vboxdrv to the file /etc/modules and reboot. This only works with secure boot disabled in the BIOS. You can check if secure boot is disabled by running mokutil --sb-state .

on Ubuntu i executed in terminal: sudo /sbin/vboxconfig This solved my problem

After reading through most of the answers here is what helped me: I uninstalled a bunch of old kernels (I currently am on 5.18-MANJARO, but had Kernels all the way back to 49 still installed). It seems like it messed with virtualbox as well. I uninstalled the old kernels, then installed the most recent virtualbox-host-modules (54, 510, 515) and now virtual box can start virtual machines again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM