Why do Guest Additions need kernel headers in VirtualBox 4.04.?

35,598

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

Share:
35,598

Related videos on Youtube

Takkat
Author by

Takkat

Updated on September 18, 2022

Comments

  • Takkat
    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
      Admin almost 12 years
      the headers have already installed !!
    • Admin
      Admin almost 12 years
      i 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
      Takkat almost 12 years
      Did you install the guest additions in the guest? (Edited my answer to make that clear).
    • Admin
      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
      David Cary almost 10 years
      Is this a duplicate of askubuntu.com/questions/98416/… ?
  • Mike Pelley
    Mike Pelley almost 11 years
    This worked for me!
  • Maciej Zgadzaj
    Maciej Zgadzaj about 10 years
    Also, make sure you have most recent VirtualBox (download.virtualbox.org/virtualbox)
  • Ben Creasy
    Ben Creasy over 6 years
    dkms is not required these days - there's a script over at forums.virtualbox.org/… which might be able to help install guest additions
  • f0nzie
    f0nzie almost 4 years
    This 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.