我在使用 VirtualBox 和 Ubuntu 18.04 以及 Linux 4.15.0-99-generic 内核作为主机时遇到了一些问题。当我尝试启动 Windows 客户机时,系统提示我以下错误:
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
'/sbin/vboxconfig'
as root.
If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
我已禁用安全启动,执行“/sbin/vboxconfig”失败并显示以下日志:
Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/4.15.0-99-generic/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j8 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
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 /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/includ$
gcc -Wp,-MD,/tmp/vbox.0/.SUPDrv.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./a$
gcc -Wp,-MD,/tmp/vbox.0/.SUPDrvGip.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I$
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
gcc -Wp,-MD,/tmp/vbox.0/.SUPDrvSem.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I$
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
gcc -Wp,-MD,/tmp/vbox.0/.SUPLibAll.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I$
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
gcc -Wp,-MD,/tmp/vbox.0/.SUPDrvTracer.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi$
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
gcc -Wp,-MD,/tmp/vbox.0/r0drv/.alloc-r0drv.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include$
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/SUPDrv.o' failed
make[2]: *** [/tmp/vbox.0/SUPDrv.o] Error 1
gcc -Wp,-MD,/tmp/vbox.0/r0drv/.initterm-r0drv.o.d -nostdinc -isystem /opt/gcc-9.2.1/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/incl$
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/SUPDrvSem.o' failed
make[2]: *** [/tmp/vbox.0/SUPDrvSem.o] Error 1
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/SUPDrvGip.o' failed
make[2]: *** [/tmp/vbox.0/SUPDrvGip.o] Error 1
/opt/gcc-9.2.1/libexec/gcc/x86_64-pc-linux-gnu/9.2.1/cc1: error while loading shared libraries: libisl.so.21: cannot open shared object file: No such file or directory
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/SUPDrvTracer.o' failed
make[2]: *** [/tmp/vbox.0/SUPDrvTracer.o] Error 1
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/SUPLibAll.o' failed
make[2]: *** [/tmp/vbox.0/SUPLibAll.o] Error 1
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/r0drv/alloc-r0drv.o' failed
make[2]: *** [/tmp/vbox.0/r0drv/alloc-r0drv.o] Error 1
scripts/Makefile.build:330: recipe for target '/tmp/vbox.0/r0drv/initterm-r0drv.o' failed
make[2]: *** [/tmp/vbox.0/r0drv/initterm-r0drv.o] Error 1
Makefile:1577: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile-footer.gmk:114: recipe for target 'vboxdrv' failed
我有:
- 重新安装VirtualBox,
- 尝试了几个不同版本的 VirtualBox(最新版本、测试版、Ubuntu repo 等),
- 重新安装 dkms、virtualbox-dkms 和 headers,
- 尝试安装共享库,
- 更新了我的系统。
全部失败。
有其他人遇到过这个问题吗?我实在想不出来了。这个问题是在我运行了几次系统更新后重新启动系统后出现的。
非常感谢你的帮助!
答案1
那是一个老内核!无论如何,该消息表明你错过了libisl.so.21
,这对我来说更加令人困惑,因为
- 它是编译器的依赖项,因此你应该有它
- 作为共享库,它不应该出现在内核模块中
但是,你构建它的编译器(gcc-9.2.1
)实际上是相当新的,并且由于你需要使用与内核相同的编译器来编译内核模块,并且你的内核是使用编译的gcc-7
,所以我建议尝试
CC=gcc-7 /sbin/vboxconfig
当然你需要安装 gcc-7。如果它不起作用,请发布日志。