Ubuntu 13.10 升級核心後,VirtualBox 核心模組 (vboxdrv) 與新核心版本不匹配,導致啟動虛擬機報錯 Kernel driver not installed (rc=-1908)。解決核心步驟:安裝對應版本 linux-headers → 重新編譯 DKMS 模組 → 註冊核心模組。
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.
Ubuntu Desktop 13.10
VirtualBox 4.3
Kernel 3.11.0-17-generic
sudo /etc/init.d/vboxdrv setup
# 報錯:unable to find the sources of your current Linux kernel
# 建議查看 /var/log/vbox-install.log
sudo apt-get install dkms
# 提示已是最新版,非 DKMS 本身問題
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
原理:VirtualBox 核心模組編譯需核心頭文件 (kernel headers) 獲取資料結構定義、函式宣告。核心升級後若未同步安裝 headers,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.
GUI 點擊啟動虛擬機,應正常進入客體 OS。

apt-get dist-upgrade) 會安裝新核心但不自動安裝對應 headersvboxdrv 但找不到 headers/dev/vboxdrv 裝置節點缺失# 設定核心升級自動安裝 headers (需 apt 2.0+)
echo 'APT::Install-Recommends "true";' | sudo tee /etc/apt/apt.conf.d/99install-recommends
# 或手動鎖定核心版本避免意外升級
sudo apt-mark hold linux-image-generic linux-headers-generic
此解決方案適用於所有 Ubuntu 及衍生版 (Mint, Pop!_OS 等) 核心升級後 VirtualBox 失效的情況,核心版本不限。
核心指令組合:
sudo apt-get install linux-headers-$(uname -r)
sudo /etc/init.d/vboxdrv setup
兩行指令解決 90% 核心升級導致的 VirtualBox 啟動失敗問題。