I'm receiving "Failed to setup service vboxadd"

Discussions about using Linux guests in VirtualBox.
Post Reply
CoffeeDrinker
Posts: 6
Joined: 17. Nov 2016, 18:13
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Kali-Linux

I'm receiving "Failed to setup service vboxadd"

Post 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:~# 
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

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

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

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

Post by scottgus1 »

I didn't know 'gcc' and 'make' were "Windows Hosts" commands (wink wink nod nod) :lol:
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Post 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!
0xOdilup
Posts: 1
Joined: 23. Nov 2016, 15:24

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

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
CoffeeDrinker
Posts: 6
Joined: 17. Nov 2016, 18:13
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Kali-Linux

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

Post 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.
Elizine
Posts: 34
Joined: 19. May 2015, 10:49

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

Post by Elizine »

Try

Code: Select all

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