Error building main Guest Additions Module while installing VirtualBox guest additions
For VirtualBox version 4.2.0 . Oracle's Version.
Install the package virtualbox-guest-x11
and you will be fine.
From terminal (Virtual System)
sudo apt-get install virtualbox-guest-x11
Reboot you Virtual System.
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
apt-get purge xserver-xorg-video-vmware
reinstall guest additions from the 4.6.2 .iso (available from above URL)
add "vboxvideo" in /etc/modules (I
sudo gedit /etc/modules
but could
sudo bash -c 'echo vboxvideo >> /etc/modules'
)
stop the virtual machine
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
Start a terminal and type:
sudo apt-get install build-essential linux-headers-`uname -r` dkms
Then reinstall VirtualBox Guest Addition from Devices → Install Guest Addition.
Tested in Windows 7 as host with VirtualBox 2.2.4