8

After downloading the following iso VBoxGuestAdditions_5.1.0.iso based on the following documentation https://www.vagrantup.com/docs/virtualbox/boxes.html

and then running the following commands

sudo mkdir /media/VBoxGuestAdditions
sudo mount -o loop,ro VBoxGuestAdditions_5.1.0.iso /media/VBoxGuestAdditions
sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run

I receive and error:

Failed to set up service vboxadd, please check the log file /var/log/VBoxGuestAdditions.log for details.

When I review this log, it refers to another log file /var/log/vboxadd-install.log. When I review this log, I see the following:

make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.13.0-93-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: Makefile: No such file or directory
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[1]: *** No rule to make target `Makefile'.  Stop.
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

I have the following packages installed. I even removed them and added them again: linux-headers-$(uname -r) linux-generic linux-image-generic linux-headers-generic linux-signed-generic dkms build-essential

I am not certain how to debug this further. Any assistance to the problem would be appreciated.

In addition, I then attempted to use the Guest addition CD that is included with Virtual Box. Upon entering the CD and accepting the installation, the following occurs Upon inserting the Guest Additions CD, I receive the following error:

Verifying archive integrity... All good.  
Uncompressing VirtualBox 5.1.4 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 4.3.20 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
Press Return to close this window...

I then proceed to review the file /var/log/VBoxGuestAdditions.log, and this is what it indicates:

vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..

I then proceed to open /var/log/vboxadd-install.log and I see the following:

/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

This places the system in a bad state with no way to recover except for starting over with the image.

12

it seems that there were some prerequisites you did not fulfill something like: apt-get install build-essential module-assistant linux-headers-$(uname -r)

it worked for me.

  • It appears I was missing the module-assistant package. As soon as I installed this package, guest additions started working. – thxmike Nov 16 '16 at 20:08
  • This alone did not work for me, I had to also install linux headers: apt-get install -r gcc make linux-hearders-$(uname -r) – Travitron Feb 10 '17 at 23:09
  • The module-assistant did it for me as well. In Ubuntu, I also do virtualbox-dkms. – jonpeck May 7 '17 at 4:34
  • Sometimes installing linux-headers gives an error saying "Unable to locate packages". In that case please run following commands: apt-get install linux-headers-<LATEST VERSION>-ubuntu-amd64 and apt-get install linux-image-<LATEST VERSION>-ubuntu-amd64 – TheRookierLearner Jan 14 '18 at 0:44
0

The Guest Additions is a part of the VirtualBox Installation. From the Virtualbox interface, click on:

Device -> Insert Guest Additions -> CD Image.

Now from your Guest OS, run the Guest install from the CD in the Guest machine.

  • I tried this process as well. It does not work. I run into the same issue as above. – thxmike Aug 31 '16 at 10:53
  • What errors do you get when you run the CD after inserting the image? – L. D. James Aug 31 '16 at 11:56
  • I have updated the earlier question indicating the problem when inserting the Guest additions CD as well – thxmike Sep 4 '16 at 22:11
  • @thxmike Are you in the guest machine when you are performing this installation? – L. D. James Sep 4 '16 at 22:14
  • To answer the above question, Yes, I am on the guest machine. – thxmike Sep 10 '16 at 1:53
0

I had this problem. In order to fix it I did copy the file VBoxLinuxAdditions.run to /root/ folder and changed the file permissions to 755. Also, I installed the prerequisites "build-essential module-assistant linux-headers-$(uname -r)". After that the installation worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.