unable to compile debian 9.4 linux guest additions in virtualbox
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
unable to compile debian 9.4 linux guest additions in virtualbox
Hello,
I have been unable to compile guest additions for debian linux 9.4. Kernel headers are installed for the running kernel, but not able to compile without error. I have copy/pasted the output.
root@debian:/media/cdrom# sh VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.16 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.16 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Copying additional installer modules ...
Installing additional modules ...
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.
...done.
Installing graphics libraries and desktop services components ...done.
root@debian:/media/cdrom#
grep: /lib/modules/4.9.0-6-686/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.9.0-6-686/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-headers-4.9.0-6-686 KBUILD_SRC=/usr/src/linux-headers-4.9.0-6-common \
-f /usr/src/linux-headers-4.9.0-6-common/Makefile 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 ; \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-headers-4.9.0-6-common/scripts/Makefile.build obj=/tmp/vbox.0
it says there clearly what's wrong, and what you need to do:
Quote:
Originally Posted by sirius57
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.
so i'd try installing the appropriate kernel header packages next.
looking at /var/log/vboxadd-install.log also cannot hurt.
I have made sure that the correct header files are installed by matching the kernel with the header files. The matching series of header files for the kernel version were installed and received the same error when trying to compile guest additions. I did the system update before compiling the guest additions. My next move is to revert to the clean snapshot made after the vm was initially installed and start over.
Last edited by sirius57; 07-13-2018 at 08:42 PM.
Reason: edit the syntax of my wording.
I started with a clean snapshot and checked my running kernel with uname -r then
sudo apt-get install linux-headers-$(uname -r)
then install gcc and make
Still get same error. Now thinking that the kernel headers are not found.
I am out of troubleshooting ideas
I decided to try a later debian version.
ran
apt update
apt upgrade
apt install build-essential module-assistant dkms
m-a prepare
sh VBoxLinuxAdditions.run
same error as above.
I tried make oldconfig && make prepare in /usr/src
output:
No rule to make target 'oldconfig'
/usr/src lists all the kernel headers for the kernel and guest additions, but I do not see the kernel and not sure on the proper usage of the make oldconfig && make prepare command.
Last edited by sirius57; 07-18-2018 at 08:54 PM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.