« Kernel driver not installed » lors du lancement d’une Virtualbox

Lors du lancement d’une machine virtuelle Virtualbox sur Ubuntu version 12.10, j’ai l’erreur suivante :

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
/etc/init.d/vboxdrv setup
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

Lorsqu’on lance la commande demandée on obtient ceci.

$ sudo /etc/init.d/vboxdrv setup
* Stopping VirtualBox kernel modules                                    [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules                       [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS                  Error! Your kernel headers for kernel 3.5.0-23-generic cannot be found.
Please install the linux-headers-3.5.0-23-generic package,
or use the –kernelsourcedir option to tell DKMS where it’s located

* Failed, trying without DKMS
* Recompiling VirtualBox kernel modules
* Look at /var/log/vbox-install.log to find out what went wrong

On regarde donc le fichier de log.

more /var/log/vbox-install.log
Uninstalling modules from DKMS
removing old DKMS module vboxhost version  4.2.6

——————————
Deleting module version: 4.2.6
completely from the DKMS tree.
——————————
Done.
Attempting to install using DKMS

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

DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: unable to find the sources of your current Linux kernel
. Specify KERN_DIR=<directory> and run Make again. Arrêt.

Voilà pour le problème. Et maintenant Mesdames et Messieurs la solution avec les commandes à lancer

sudo apt-get purge virtualbox* dkms linux-headers-$(uname -r)
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install virtualbox

Leave a Reply