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 have installed Ubuntu 12.10 Guest on Ubuntu 12.04 Host using VirtualBox. Everything is from repository and no direct install. When I install the guest additions, the below error is shown in the console. Before running the command I mapped the VBoxGuestAdditions.iso in the Guest.

The closest I could get is this article which says to install the latest version of VirtualBox (not the one from the repository). Is there any alternate solution?

sudo ./VBoxLinuxAdditions.run

Verifying archive integrity... All good.  
Uncompressing VirtualBox 4.1.12 Guest Additions for Linux.........  
VirtualBox Guest Additions installer  
Removing installed version 4.1.12 of VirtualBox Guest Additions...  
Removing existing VirtualBox DKMS kernel modules ...done.  
Removing existing VirtualBox non-DKMS kernel modules ...done.  
Building the VirtualBox Guest Additions kernel modules  
The headers for the current running kernel were not found. If the following  
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!  
(Look at /var/log/vboxadd-install.log to find out what went wrong)  
Doing non-kernel setup of the Guest Additions ...done.  
Installing the Window System drivers  
Warning: unknown version of the X Window System installed.  Not installing  
X Window System drivers.  
Installing modules ...done.  
Installing graphics libraries and desktop services components ...done.
share|improve this question
1  
Please clarify the virtualbox version - v4.2.2 has been released - you should be using that. –  fossfreedom Oct 21 '12 at 13:19
    
What comes with the 12.04 repo is VirtualBox 4.1.12. So, I should install it separately not from the repo. –  Praveen Sripati Oct 21 '12 at 16:20

5 Answers 5

up vote 22 down vote accepted

For VirtualBox version 4.2.0 . Oracle's Version.

Install the package virtualbox-guest-x11 and you will be fine.

enter image description here

From terminal (Virtual System)

sudo apt-get install virtualbox-guest-x11

Reboot you Virtual System.

share|improve this answer
    
Installing virtualbox-guest-x11 allowed full screen. But, sudo ./VBoxLinuxAdditions.run on the guest gives the same error as mentioned in the OP. Does it mean that the guest add-ons have been installed successfully? –  Praveen Sripati Oct 21 '12 at 16:19
    
What guest-additions offers ? see here. So I assume the answer to your question is Yes, installed successfully. –  NikTh Oct 21 '12 at 17:52
    
Thanks - got it - accepted the answer. So, your solutions installs the X Windows System Drivers in the guest. –  Praveen Sripati Oct 22 '12 at 1:12

Upgrading to Virtualbox version 4.2.4 using Synaptic Package Manager (Dash Home did not show the new version in the Ubuntu repositories) I still needed to get kernel headers to avoid the 'missing kernel headers' error message and build the guest additions.

sudo apt-get install build-essential kernel-headers-`uname -r`

Note: That is a BACKTIC uname -r NOT a single apostrophe 'uname -r' (On my keyboard the backtic is just to the Left of the number 1).

share|improve this answer
1  
This gives me an error E: Unable to locate package kernel-header-3.5.0.21-generic. –  dibs Dec 20 '12 at 20:19

Start a terminal and type:

sudo apt-get install build-essential linux-headers-`uname -r` dkms

Then re-install VirtualBox Guest Addition from Devices > Install guest addition.
This one works for me.

Tested in Windows 7 as host with VirtualBox 2.2.4

share|improve this answer

I received the dreaded "The headers for the current running kernel were not found" even though "Complete Generic Linux Kernel and Headers" were installed (Ubuntu 12.10 running under VirtualBox on a Windows Server 2003/Q6600). So I checked out this page...

For clarity's sake, the precise command for you copy-pasters out there (which would include me, hence I found out that a little clarification was in order) is:

sudo apt-get install build-essential linux-headers-`uname -r` dkms

Which further implies under "Devices" first turn "Shared Clipboard" on to "Bi-Directional" (for ease of use)

Then open a terminal window (click on the top "Dash" button, type "terminal" in the search box, click on the terminal icon to open same)

Then copy/paste the above sudo apt-get command in the terminal window by right-clicking in the terminal window

Then enter your root/admin password when prompted

Then Devices/Install Guest Addition via VirtualBox

And, extraneous to the above sequence but still on the subject of Guest Additions, the latest/greatest can always be downloaded/mounted as a CD from

http://download.virtualbox.org/virtualbox/

Additional info for Ubuntu 12.10 as I subsequently found out I had to

  1. apt-get purge xserver-xorg-video-vmware

  2. reinstall guest additions from the 4.6.2 .iso (available from above URL)

  3. add "vboxvideo" in /etc/modules (I

    sudo gedit /etc/modules
    

    but could

    sudo bash -c 'echo vboxvideo >> /etc/modules' 
    

    )

  4. stop the virtual machine

  5. Settings/Display/Enable 3D acceleration

to get better performance. Now I get

Not software rendered: yes

Not blacklisted: yes

GLX fbconfig: yes

GLX texture from pixmap: yes

GL npot or rect textures: yes

GL vertex program: yes

GL fragment program: yes

GL vertex buffer object: yes

GL framebuffer object: yes

GL version is 1.4+: yes

as well as some not-so-pleasing OpenGL warnings related to the mesa table from the command

/usr/lib/nux/unity_support_test -p
share|improve this answer

I'm an absolute Linux noob, so I don't know why the above uname -r syntax wouldn't work for me; however, the following was successful:

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

Hopefully this actually applies to the situation and can help someone else.

Ubuntu 12.10 64-bit VirtualBox guest in Windows 7 64-bit

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.