VirtualBox:在 Ubuntu 12.10 上安裝來賓新增作為來賓作業系統

VirtualBox:在 Ubuntu 12.10 上安裝來賓新增作為來賓作業系統

我使用 Windows 7 作為主機,使用 Ubuntu 12.10 Remix(純 Gnome 的 Ubuntu)作為訪客。

一切正常。我以常規方式安裝了 VBoxAdditions - 使用 VirtualBox VM 管理器中的相應命令,然後VBoxLinuxAdditions.run從安裝的磁碟機執行腳本。安裝過程看起來也不錯。
但是,在/var/log/vboxadd-install.log我看來:

Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/4.2.6/source ->
                 /usr/src/vboxguest-4.2.6

DKMS: add completed.
Error! Your kernel headers for kernel 3.5.0-17-generic cannot be found.
Please install the linux-headers-3.5.0-17-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Failed to install using DKMS, attempting to install without
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

然後我按照說明嘗試安裝linux-headers-3.5.0-17-generic,並得到這個(日誌中的最後兩行apt-get):

Error! Problems with depmod detected.  Automatically uninstalling this module.
DKMS: Install Failed (depmod problems).  Module rolled back to built state.

答案1

請安裝 linux-headers-3.5.0-17-generic 套件。

由於 virtualbox 針對目前核心編譯其模組,因此它至少需要該核心的 C 頭檔。

相關內容