linux - 警告 vboxdrv 内核模块未加载

标签 linux kernel virtualbox

好吧,我运行这个命令

aptitude purge ~o

要删除 aptitude 向我显示的所有 Obsoletes 文件,我想我更新系统后一切正常,但是当我重新启动系统并想要加载虚拟机时,我得到了这个错误

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.

程序仍在运行,但我无法加载虚拟机,所以我运行该命令,结果是。

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)

我将只发布文件的一部分,因为 vbox-install.log 有很多行。

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

最后一部分。

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.

非常感谢您的任何帮助或意见。

最佳答案

对于 Ubuntu 15.10 和 virtualbox 5.+ 使用:

sudo /sbin/rcvboxdrv setup

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

关于linux - 警告 vboxdrv 内核模块未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23740932/

相关文章:

使用KGDB远程调试Linux内核: GDB does not recognize functions?

html - IE 中文本框周围的边框断开

linux - 匹配时如何退出 Sed

ios - 转换视频预览中每个像素的颜色 - Swift

c - IFF_UP 和 IFF_RUNNING 有什么区别?

windows - 访问设备配置空间-win内核PCI设备

ruby - Bundler 如何卸载冲突的依赖项

sockets - 如何通过套接字连接到虚拟机

c - 为什么在 UNIX 中只分配最低的可用文件描述符?

linux - 以低延迟访问 PCI 内存条 (Linux)