我在 VirtualBox 上安装了 Kali Linux,主机是 MacOS。当我尝试执行./VBoxLinuxAdditions.run
命令时,我收到以下文本:
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.22 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
在/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: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: modprobe vboxguest failed.
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.
在vboxadd-install.log
我得到这个:
/tmp/vbox.0/Makefile.include.header:112: *** 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.
有谁知道如何解决这个问题?
答案1
正如所指出的地毯您可以通过运行以下命令在 Kali Linux >=4.2 客户机上安装客户机附加功能:
sudo apt update
sudo apt install -y virtualbox-guest-x11
sudo reboot -f
请参阅Kali Linux 项目提供的官方说明了解详情。此页面还包含旧版 Kali Linux 的说明。