下载以下iso VBoxGuestAdditions_5.1.0.iso之后,根据以下文档https://www.vagrantup.com/docs/virtualbox/boxes.html
然后运行以下命令
sudo mkdir /media/VBoxGuestAdditions
sudo mount -o loop,ro VBoxGuestAdditions_5.1.0.iso /media/VBoxGuestAdditions
sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run我接受和错误:
未能设置服务vboxadd,有关详细信息,请查看日志文件/var/ log /VBoxGuestAsitions.log。
当我查看这个日志时,它引用了另一个日志文件/var/log/vboxadd-install.log。当我查看此日志时,我会看到以下内容:
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.我已经安装了以下软件包。我甚至删除了它们,并再次添加了它们:linux-headers-$(uname -r) linux-generic linux-image-generic linux-headers-generic linux-signed-generic dkms build-essential
我不确定如何进一步调试。如能对这一问题提供任何帮助,将不胜感激。
此外,我还尝试使用Virtual中包含的来宾添加CD。输入CD并接受安装后,在插入来宾添加CD时发生以下情况,我将收到以下错误:
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...然后,我将检查/var/log/VBoxGuestAsitions.log文件,这就是它所指出的:
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..然后继续打开/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.这使系统处于一个糟糕的状态,除了从映像开始,没有任何恢复的方法。
发布于 2016-10-13 22:46:48
似乎有一些前提条件你没有实现,比如:apt-get install build-essential module-assistant linux-headers-$(uname -r)
对我起作用了。
发布于 2016-08-28 14:30:21
客户添加是VirtualBox安装的一部分。在Virtualbox接口中,单击:
Device -> Insert Guest Additions -> CD Image.现在从您的Guest OS,运行Guest安装从CD在客服机。
发布于 2017-09-26 18:31:16
我有这个问题。为了修复它,我将文件VBoxLinuxAdditions.run复制到/root/文件夹,并将文件权限更改为755。此外,我还安装了先决条件“构建基本模块-助理linux-headers$(uname -r)”。在那之后,安装就成功了。
https://askubuntu.com/questions/817816
复制相似问题