[disclaimer] this is an old post, written before systemd and the like. The goal is the same, but removing /etc/init.d/
files isn't correct, you should use systemctl disable XXXX
rather than deleting files. [/disclaimer]
[update] I've also posted a solution here for the error Failed to connect to the guest property service
: https://github.com/NixOS/nixops/issues/908#issuecomment-387275731
1) If you run the /media/cdrom/VBoxLinuxAdditions.run
then you'll have some startup scripts in /etc/init.d that doesn't come with Debian default package.
You should get rid of these: ls /etc/*/*vbox*
(remove all rcX.d and init.d files with vbox in the filename).
Important note: You should also look for already compiled modules:
find /lib/modules/ -name "vbox*"
and remove these (based on the assumption that everything was badly installed). If you have multiple files with the same name, that could explain the whole issue (multiple versions of Guest additions are installed).
Or you can simply run: sh /media/cdrom/VBoxLinuxAdditions.run uninstall
.
2) Install only the Debian package virtualbox-guest-dkms
: it seems that VirtualBox doesn't depend on build-essential
and module-assistant
but needs both packages (as stated by @gaborous)! So install all three:
sudo apt-get install build-essential module-assistant virtualbox-guest-dkms
3) To check everything's fine, for example using systemctl
command, just after removing all traces of the CD-Rom install:
- vboxadd-service.service not-found failed failed vboxadd-service.service
- vboxadd.service not-found active exited vboxadd.service
- virtualbox-guest-utils.service loaded active running LSB: VirtualBox Linux Additions
- virtualbox-guest-x11.service loaded active exited LSB: VirtualBox Linux X11 Additions
- virtualbox.service not-found active exited virtualbox.service
After restart:
- virtualbox-guest-utils.service loaded active running LSB: VirtualBox Linux Additions
- virtualbox-guest-x11.service loaded active exited LSB: VirtualBox Linux X11 Additions
4) use systemctl --failed
to list all units that have failed.
And you're back on Debian's wonderful packages :-)