Why do Guest Additions need kernel headers in VirtualBox 4.04.?
Solution 1
I found that installing dkms
with
sudo apt-get install dkms
resolved this error/warning for me. See this answer.
Solution 2
This command will install the kernel headers:
sudo apt-get install linux-headers-$(uname -r)
Now, try to install the Guest Additions again.
Solution 3
For me (Ubuntu 12.04 LTS host; Ubuntu 13.04 guest; virtualbox 4.1.18 running on the host), it seems that the downloaded guest-additions iso on the host was old, so installing by mounting that iso through vbox's menus failed consistently. There was no package virtualbox-guest-additions
available on the guest, so I installed
$ sudo apt-get install virtualbox-guest-dkms
instead, which also pulled in dkms
, fakeroot
, virtualbox-guest-utils
, and virtualbox-guest-x11
. Then I rebooted the guest, and copy/paste worked (also, the resolution jumped up).
Solution 4
It seems that ubuntu 11.10 does not ship compiler by default. Try apt-get install gcc gcc-4.7
Related videos on Youtube
Takkat
Updated on September 18, 2022Comments
-
Takkat almost 2 years
I'm trying to install the Guest Additions in VirtualBox 4.04.on ubuntu 11.10
I have this error:
The headers for the current running kernel were not found. If the module compilation fails then this could be the reason.
Note that I have already installed the headers but still get this error.
Do you have you an ideas please?
-
Admin almost 12 yearsthe headers have already installed !!
-
Admin almost 12 yearsi have done apt-get install virtualbox-guest-additions and in the restart i have this message: modprobe vboxsf failed! starting the virtualbox-guest-additions fail !
-
Takkat almost 12 yearsDid you install the guest additions in the guest? (Edited my answer to make that clear).
-
Admin almost 12 years@Takkat yes i have done apt-get install virtualbox-guest-additions in ubuntu 11.10 now i canot open the virtual machine 11.10 i don't know why , have you an idea please it display that starting the virtualbox-guest-additions fail ! it still blocked
-
David Cary almost 10 yearsIs this a duplicate of askubuntu.com/questions/98416/… ?
-
-
Mike Pelley almost 11 yearsThis worked for me!
-
Maciej Zgadzaj about 10 yearsAlso, make sure you have most recent VirtualBox (download.virtualbox.org/virtualbox)
-
Ben Creasy over 6 yearsdkms is not required these days - there's a script over at forums.virtualbox.org/… which might be able to help install guest additions
-
f0nzie almost 4 yearsThis fixed my issue in a Debian 10 (Buster) VM running under VirtualBox 6.1. The error I was getting
VirtualBox Guest Additions: Kernel headers not found for target kernel
.