Skip to main content

Virtualbox - faltando headers

Ao iniciar o Virtualbox, aparece uma mensagem dizendo para executar o /sbin/vboxconfig como root.

Ao executar o comando indicado, aparece a seguinte mensagem de erro:

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-4.9.0-6-amd64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-4.9.0-6-amd64

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.

 

Para resolver, basta instalar os headers indicados na mensagem de erro.

sudo apt install linux-headers-amd64 linux-headers-4.9.0-6-amd64

E depois, rodar de novo o comando para configurar o Virtualbox:

sudo /sbin/vboxconfig

 

O detalhe aqui é verificar o header descrito na mensagem de erro.