My Host OS is Windows 7 Professional. I have installed Ubuntu 13.04 inside Virualbox - 4.2.6. When I tried to install guest Additions for Ubuntu I got error in the terminal as below:

ranjeet@ringtail:/media/ranjeet/VBOXADDITIONS_4.2.6_82870$ sudo sh VBoxLinuxAdditions.run
[sudo] password for ranjeet: 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.6 Guest Additions for Linux..........
VirtualBox Guest Additions installer
Removing installed version 4.2.6 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
Installing X.Org Server 1.13 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services components ...done.

The logs are as below.


Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/4.2.6/source ->

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.8.0-19-generic -C /lib/modules/3.8.0-19-generic/build M=/var/lib/dkms/vboxguest/4.2.6/build....(bad exit status: 2)
Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
    import apport
ImportError: No module named apport
Error! Bad return status for module build on kernel: 3.8.0-19-generic (x86_64)
Consult /var/lib/dkms/vboxguest/4.2.6/build/make.log for more information.
Failed to install using DKMS, attempting to install without
grep: /lib/modules/3.8.0-19-generic/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
    echo >&2;                           \
    echo >&2 "  ERROR: Kernel configuration is invalid.";       \
    echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
    echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
    echo >&2 ;                          \
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include  -I/usr/src/linux-headers-3.8.0-19-generic/arch/x86/include -Iarch/x86/include/generated  -Iinclude -I/usr/src/linux-headers-3.8.0-19-generic/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.8.0-19-generic/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.8.0-19-generic/include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-sse -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=1024 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/3.8.0-19-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
/tmp/vbox.0/VBoxGuest-linux.c:199:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’
/tmp/vbox.0/VBoxGuest-linux.c:328:21: error: ‘g_VBoxGuestPciId’ undeclared here (not in a function)
/tmp/vbox.0/VBoxGuest-linux.c:209:1: error: ‘__mod_pci_device_table’ aliased to undefined symbol ‘g_VBoxGuestPciId’
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
  • 2
    Close-voters: Only new questions are off-topic for being about end-of-life releases. We don't go back and close questions where the OP was using an EoL release. As Thomas W. said in another post: "While this means new questions (stressing the new) about 13.04 are off topic, older questions (both answered and unanswered) that were around before the EOL date should not be closed or deleted." Mar 24, 2014 at 21:23

7 Answers 7


The Guest Additions may not compile on Linux kernels newer than those they were designed for. Therefore it is not unusual that older version of VirtualBox are unable to run a guest with a newer Kernel.

Quite a few of those incompatibilities were fixed in more recent releases.

To take advantage of this, and to be able to run Ubuntu 13.04 (or later) upgrading your VirtualBox software is recommended. You can download the most recent version from here:


just run a simple command in terminal -

sudo apt-get install virtualbox-guest-x11

After completion, reboot your virtual box.

  • of course, always the most unpopular answer solves my problem
    – busuu
    Apr 7, 2018 at 20:20

The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.


sudo apt-get install linux-generic

linux-generic is a meta-package that depends on latest kernel image and headers. Thus, it will install needed packages to compile VirtualBox additions kernel module.


If anyone still having problems, this fixed it for me:

sudo apt-get install build-essential module-assistant




Oracle Virtualbox v4.2.8 r83876 for Windows on a Toshiba laptop running Windows 7. Guest OS within Virtualbox is Lubuntu 13.10 (32-bit).


I'm simply going to list the commands I ran that eventually resolved the issues (Screen resolution not using entire display, mouse roller not working, bidirectional copy and paste (clipboard) not working.

There are a few excerpts of output after some of the apt-get comamnds.

I restarted my Lubuntu guest OS after each, sudo apt-get install ... command.


1) Shutdown Lubuntu guest OS

2) Mount Virtualbox Guest Additions iso.

3) From within Virtualbox Manager, right-click Lubuntu guest OS > Settings > Storage > right-click IDE > Add CD/DVD Device > Navigate to the folder on Windows containing the VBoxGuestAdditions.iso (e.g., \Program Files\Oracle\Virtualbox)

4) From within Virtualbox Manager, launch Lubuntu guest OS.

5) From within Lubuntu guest OS, launch LXTerminal

6) Within LXTerminal,

cd /media/$USER/VBOXADDITIONS_4.2.8_83876
sudo ./VBoxLinuxAdditions.run

NOTE: Your Additions version number may be different.

For me, this command output was

...The make utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The gcc utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

Building the main Guest Additions module ...fail!
Warning: unknown version of the X Window System installed.  Not installing
X Window System drivers.

If you get this same output run:

sudo apt-get update
sudo apt-get install dkms build-essential virtualbox-guest-x11 linux-headers-generic linux-headers-virtual

All issues should be solved. (You might need to restart the virtual machine.)


The only way I found to solve my problem was:

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

, then I tried to install the guest additions again and it worked perfectly after rebooting the system.


Using the command:

sudo apt-get install virtualbox-guest-additions-iso 

and performing a restart solved this issue on Ubuntu 20.10.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .