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套件並安裝了。

相關內容