VirtualBox: Installieren von Guest Additions unter Ubuntu 12.10 als Gastbetriebssystem

VirtualBox: Installieren von Guest Additions unter Ubuntu 12.10 als Gastbetriebssystem

Ich verwende Windows 7 als Host und Ubuntu 12.10 Remix (Ubuntu mit reinem Gnome) als Gast.

Alles funktioniert einwandfrei. Ich habe VBoxAdditions auf normale Weise installiert – mit dem entsprechenden Befehl im VirtualBox VM-Manager und dann mit dem Ausführen VBoxLinuxAdditions.rundes Skripts vom gemounteten Laufwerk. Der Installationsvorgang scheint auch in Ordnung zu sein.
ABER /var/log/vboxadd-install.logich sehe Folgendes:

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.

Dann folge ich den Anweisungen und versuche die Installation linux-headers-3.5.0-17-generic. Dabei erhalte ich Folgendes (die letzten beiden Zeilen im Protokoll danach apt-get):

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

Antwort1

Bitte installieren Sie das Paket linux-headers-3.5.0-17-generic.

Da Virtualbox sein Modul mit dem aktuellen Kernel kompiliert, benötigt es mindestens die C-Headerdateien für diesen Kernel.

verwandte Informationen