Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 231140  / 3 Years ago, mon, may 10, 2021, 7:14:47

I'm trying to install the Guest Additions in VirtualBox 4.04. Host OS is Ubuntu desktop 11.04 64bit, guest OS is Ubuntu server 11.10 64bit.



$ sudo ./VBoxLinuxAdditions.run


After some output this line is printed:



The headers for the current running kernel were not found.


But the headers are installed, at least accordingly to dpkg:



$ dpkg --get-selections | grep linux-headers
linux-headers-3.0.0-12 install
linux-headers-3.0.0-12-server install
linux-headers-server install


The running kernel is:



$ uname -a
Linux foobar 3.0.0-12-server #20-Ubuntu SMP Fri Oct 7 16:36:30 UTC 2011 x86_64 x86_64 X86_64 GNU/Linux


How do I fix things so that Guest Additions installer is able to find kernel headers?



Update: added full output.



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

Building the main Guest Additions module ...done.
Building the shared folder support module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Installing the Window System drivers ...fails!
(Could not find the X.Org or XFree86 Window System).


I don't care for fail #2, because that's a server and I don't need X server. But I need shared folder support.



Some further detail:



$ tail /val/log/vboxadd-install.log
..........
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vbox.0/vfsmod.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxsf] Error 2

More From » kernel

 Answers
0

To get a VirtualBox ubuntu server guest to correctly accept a guest-additions install you will need to have a minimal xorg package install:



sudo apt-get install xserver-xorg xserver-xorg-core


By doing this, you will have the shared-folder support.



As you have found, the guest additions is one very large script - "VBoxLinuxAdditions.run"



You may be able to unpick this file - I wouldnt recommend it, because as newer versions of virtualbox is released, the version of guest-additions is usually bumped as well.



In addition, I would recommend (if you haven't already), install dkms. When newer ubuntu kernels are updated, the guest-additions kernel modules will be automatically compiled. Without dkms you will lose your shared-folder support when a kernel update is made.



source


[#40762] Monday, May 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
overine

Total Points: 20
Total Questions: 109
Total Answers: 98

Location: Aruba
Member since Fri, Jun 24, 2022
2 Years ago
overine questions
Tue, Jul 12, 22, 00:27, 2 Years ago
Wed, Jan 11, 23, 02:15, 1 Year ago
Tue, Aug 10, 21, 01:39, 3 Years ago
;