Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jul 19 '12 at 14:16

This question came from our site for professional and enthusiast programmers.

    
the headers have already installed !! –  user78022 Jul 19 '12 at 14:34
    
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 ! –  user78022 Jul 19 '12 at 16:54
    
Did you install the guest additions in the guest? (Edited my answer to make that clear). –  Takkat Jul 19 '12 at 20:37
    
@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 –  user78022 Jul 20 '12 at 12:21

6 Answers 6

This command will install the kernel headers:

sudo apt-get install linux-headers-$(uname -r)

Now, try to install the Guest Additions again.

share|improve this answer
    
Also, make sure you have most recent VirtualBox (download.virtualbox.org/virtualbox) –  Maciej Zgadzaj Jun 5 at 10:08

I found that installing dkms resolved this error/warning for me. See this answer.

share|improve this answer

It seems that ubuntu 11.10 does not ship compiler by default. Try apt-get install gcc gcc-4.7

share|improve this answer
1  
i'd suggest using build-essentials –  Sebastian Godelet Sep 28 '13 at 21:44

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).

share|improve this answer
    
This worked for me! –  Mike Pelley Jul 19 '13 at 22:04

The message you get may not be related to the failure building the Guest Additions. I usually do see this message but Guest Additions build fine and run as expected.

Here are some steps we can try in case we cannot install the guest additions:

  • We may just try to install them again after rebooting the guest OS. If that still does not succeed we can also try to install guest additions as root from command line.

  • It may also be worth to update the guest OS before we install the Guest Additions.

  • Older versions of virtual box may have bugs that stand against a successful install of the GA. Update Virtual Box to the current version (at present 4.1.18).

  • If all fails you can also download and install the ready-built guest additions from the repositories (these will also run with the PUEL version of Virtual Box but they may be out-dated in some aspects) by running the following in the guest Ubuntu:

     sudo apt-get install virtualbox-guest-additions
    
share|improve this answer

First of all find your kernel version by:

$ uname -a
Linux ibm **3.5.0-24**-generic #37-Ubuntu SMP Thu Feb 7 01:50:30 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Next update apt by:

$ sudo apt-get update

Finally install your kernel version (3.5.0-24) header package by apt

$ sudo apt-get install linux-headers-3.5.0-24-generic
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.