dpkg-重新配置 virtualbox-dkms 失败

dpkg-重新配置 virtualbox-dkms 失败

将 linux Mint 内核更新到 4.10.0-14-generic 之后,virtualbox 不再工作。我尝试运行“mobprobe vboxdrv”

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.10.0-14-generic

然后按照几个网页我尝试重新配置 dkms:

sudo dpkg-reconfigure virtualbox-dkms

------------------------------
Deleting module version: 5.0.32
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-5.0.32 DKMS files...
Building only for 4.10.0-14-generic
Building initial module for 4.10.0-14-generic
Error! Bad return status for module build on kernel: 4.10.0-14-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.32/build/make.log for more information.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2017-04-11 16:29:30 CEST; 3ms ago
 Docs: man:systemd-sysv-generator(8)
Process: 6978 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)

Apr 11 16:29:30 marco-HP systemd[1]: Starting LSB: VirtualBox Linux kernel .....
Apr 11 16:29:30 marco-HP virtualbox[6978]:  * Loading VirtualBox kernel modu....
Apr 11 16:29:30 marco-HP virtualbox[6978]:  * No suitable module for running...d
Apr 11 16:29:30 marco-HP virtualbox[6978]:    ...fail!
Apr 11 16:29:30 marco-HP systemd[1]: virtualbox.service: Control process ex...=1
Apr 11 16:29:30 marco-HP systemd[1]: Failed to start LSB: VirtualBox Linux ...e.
Apr 11 16:29:30 marco-HP systemd[1]: virtualbox.service: Unit entered faile...e.
Apr 11 16:29:30 marco-HP systemd[1]: virtualbox.service: Failed with result...'.
Hint: Some lines were ellipsized, use -l to show in full.

这是日志的输出:

DKMS make.log for virtualbox-5.0.32 for kernel 4.10.0-14-generic (x86_64)
Tue Apr 11 16:29:21 CEST 2017
make: Entering directory '/usr/src/linux-headers-4.10.0-14-generic'
  LD      /var/lib/dkms/virtualbox/5.0.32/build/built-in.o
  LD      /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/SUPLibAll.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeLockUser’:
/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1066:18: error: too few arguments to function ‘get_user_pages_remote’
             rc = get_user_pages_remote(
                  ^
In file included from /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/the-linux-kernel.h:88:0,
                 from /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
./include/linux/mm.h:1289:6: note: declared here
 long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
      ^
scripts/Makefile.build:294: recipe for target '/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o' failed
make[2]: *** [/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
scripts/Makefile.build:567: recipe for target '/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv' failed
make[1]: *** [/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv] Error 2
Makefile:1524: recipe for target '_module_/var/lib/dkms/virtualbox/5.0.32/build' failed
make: *** [_module_/var/lib/dkms/virtualbox/5.0.32/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.10.0-14-generic'</code>

有谁知道如何解决这个问题?多谢!

答案1

通过将虚拟机文件移至安全位置(以保护虚拟机),然后完全卸载所有与 virtualbox 相关的软件包,解决了该问题。
然后我从oracle的网站下载了deb包并安装了。

相关内容