LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 07-11-2018, 08:39 PM   #1
sirius57
Member
 
Registered: Jun 2004
Distribution: puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora, opensuse 13.1, opensuse tumbleweed
Posts: 602

Rep: Reputation: 36
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
 
Old 07-12-2018, 03:37 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
it says there clearly what's wrong, and what you need to do:
Quote:
Originally Posted by sirius57 View Post
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.
 
Old 07-13-2018, 08:39 PM   #3
sirius57
Member
 
Registered: Jun 2004
Distribution: puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora, opensuse 13.1, opensuse tumbleweed
Posts: 602

Original Poster
Rep: Reputation: 36
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.
 
Old 07-14-2018, 03:48 PM   #4
sirius57
Member
 
Registered: Jun 2004
Distribution: puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora, opensuse 13.1, opensuse tumbleweed
Posts: 602

Original Poster
Rep: Reputation: 36
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
 
Old 07-18-2018, 08:53 PM   #5
sirius57
Member
 
Registered: Jun 2004
Distribution: puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora, opensuse 13.1, opensuse tumbleweed
Posts: 602

Original Poster
Rep: Reputation: 36
installed debian 4.9.0-7

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
 
Old 07-18-2018, 09:31 PM   #6
sirius57
Member
 
Registered: Jun 2004
Distribution: puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora, opensuse 13.1, opensuse tumbleweed
Posts: 602

Original Poster
Rep: Reputation: 36
Solved

I downloaded the latest iso of guest additions
from here: http://download.virtualbox.org/virtualbox
and now have a full screen.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CentOS 7 Host and Virtualbox Win 8.1 Guest with Guest Additions Installed Sum1 Linux - Virtualization and Cloud 1 03-26-2015 02:31 PM
LXer: How to install VirtualBox Guest Additions for Linux LXer Syndicated Linux News 4 08-01-2013 08:53 AM
[SOLVED] how to check version of virtualbox guest additions currently installed in guest syste masuch Linux - Virtualization and Cloud 3 09-03-2012 01:05 AM
Problem installing guest additions on virtualbox Centos 5.5 64bit guest eljay313 Linux - Virtualization and Cloud 1 09-03-2010 08:22 AM
LXer: Install Guest additions and run fullscreen mode on VirtualBox Guest OS | Linux LXer Syndicated Linux News 0 01-17-2010 05:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration