Ubuntu 13.10 升級核心後,VirtualBox Kernel 模組(vboxdrv)因版本不匹配失效,提示 Kernel driver not installed (rc=-1908)。核心解決路徑:安裝對應核心版本的 linux-headers → 重新編譯註冊 vboxdrv 模組。本文提供完整排查日誌分析與修復指令。
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded
or there is a permission problem with /dev/vboxdrv.
Re-setup the kernel module by executing '/etc/init.d/vboxdrv setup' as root.
Users of Ubuntu, Fedora or Mandriva should install the DKMS package first.
執行 sudo /etc/init.d/vboxdrv setup 仍報錯:
Makefile:183: *** Error: unable to find the sources of your current Linux kernel.
Specify KERN_DIR= and run Make again. Stop.
關鍵線索:unable to find the sources of your current Linux kernel → 缺少 linux-headers-$(uname -r)。
uname -r
# 輸出例:3.11.0-17-generic
sudo apt-get install linux-headers-$(uname -r)
# 或具體版本:sudo apt-get install linux-headers-3.11.0-17-generic
sudo apt-get install dkms
sudo /etc/init.d/vboxdrv setup
# 輸出應顯示:
# Stopping VirtualBox kernel modules ... done.
# Uninstalling old VirtualBox DKMS kernel modules ... done.
# Trying to register the VirtualBox kernel modules using DKMS ... done.
# Starting VirtualBox kernel modules ... done.
apt-get dist-upgrade)會安裝新核心並設為預設啟動。linux-headers 缺失或 DKMS 掛掉,重建失敗。vboxdrv.ko 不會自動遷移到新核心模組目錄(/lib/modules/$(uname -r)/)。linux-headers-generic 元套件,確保核心升級自動拉取對應 headers:sudo apt-get install linux-headers-generic dkmsvirtualbox-dkms),DKMS 整合更完善。sudo /sbin/vboxconfig(新版指令)註冊模組。本文以 Ubuntu 13.10 (核心 3.11) 為例,同樣適用於 12.04、14.04、16.04 等版本的核心升級後 VirtualBox 失效場景。