Page 1 of 1

I'm receiving "Failed to setup service vboxadd"

Posted: 18. Nov 2016, 05:12
by CoffeeDrinker
I've looked at many postings related to this topic, but none of them appear to be successful. I believe most of the posters were like me. I think I know what I need to do to fix this error, but being new to the Linux based system I'm not sure exactly how to do it as far as command line and syntax. Would anyone be willing to point me in the right direction? I pulled out what I think the specifics are here but listed the full terminal code at the bottom for reference.

I think I need to check these I'm just uncertain how. What is "gcc" and "make"? I know what the kernel is but I think that would be dangerous to mess with. As I mention below, postings I see people messed this up or made multiple copies..

Code: Select all

vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..
When I look at the vboxadd-intall.log I see this. I'm concerned about messing with the kernel because I have read where people have messed this up trying to fix this issue.

Code: Select all

/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.

Full code results:

Code: Select all

root@kali:~# sh /media/cdrom0/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.8 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.8 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.
root@kali:~# cat /var/log/VBoxGuestAdditions.log

Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd.service → /lib/systemd/system/vboxadd.service.
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..
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-service.service → /lib/systemd/system/vboxadd-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-x11.service → /lib/systemd/system/vboxadd-x11.service.
root@kali:~# cat /var/log/vboxadd-install.log
/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.
root@kali:~# 

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 18. Nov 2016, 05:23
by socratis
CoffeeDrinker wrote:I think I need to check these I'm just uncertain how. What is "gcc" and "make"?
Searched for it in Google? GCC is the GNU Compiler Collection. Make is another GNU tool. Please take a look at https://www.virtualbox.org/wiki/LinuxAdditionsDebug

Note that the instructions differ for each operating system distribution, so next time, please state your host and guest exact versions.

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 18. Nov 2016, 15:37
by scottgus1
I didn't know 'gcc' and 'make' were "Windows Hosts" commands (wink wink nod nod) :lol:

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 18. Nov 2016, 16:16
by mpack
Moved from "Windows Hosts" to "Linux Guests". Please choose a forum which is appropriate to your question, not one which is related to your biography!

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 23. Nov 2016, 15:45
by 0xOdilup

Code: Select all

apt-get autoclean
apt-get autoremove
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
reboot
apt-get install-linux headers$(uname -a) -y
reboot
cd /media/cdrom
cp VBoxLinuxAdditions.run /root/Desktop
cd /root/Desktop
./VBoxLinuxAdditions.run
reboot
Complete install LinuxAdditions

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 23. Nov 2016, 17:10
by Perryg
Way too many steps.

All that should be needed is the headers and build-essential for debian based OSes.

Code: Select all

sudo apt-get install build-essential linux-headers-$(uname -r)
Then mount the guest additions and run the install from a terminal with sudo.

Note: Never run as root! It is not needed and very bad for security and no one will support it if you do.

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 26. Nov 2016, 16:39
by CoffeeDrinker
I did manage to get this to work with help here from you both and using the following link:
https://www.blackmoreops.com/2014/06/10 ... ali-linux/

Everything appears to be working depsite I still receive the "Failed to setup service vboxadd." Since it is working, I'm not going to touch it.

Re: I'm receiving "Failed to setup service vboxadd"

Posted: 2. Dec 2016, 13:33
by Elizine
Try

Code: Select all

 sudo apt-get install build-essential
(installing dependencies) and reinstalling guest additions.