无法在Ubuntu 14.04上安装VBoxGuestAdditions 5.1.0


8

根据以下文档下载以下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/VBoxGuestAdditions.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 Box附带的Guest附加CD。进入CD并接受安装后,发生以下情况。插入Guest Additions 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/VBoxGuestAdditions.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.

这会使系统处于故障状态,除了重新启动映像外无法恢复。

Answers:


12

似乎您没有满足以下条件: apt-get install build-essential module-assistant linux-headers-$(uname -r)

它为我工作。


看来我缺少模块辅助软件包。一旦安装了此软件包,来宾添加操作就开始起作用。
thxmike

单单这对我不起作用,我还必须安装Linux标头:apt-get install -r gcc make linux-hearders-$(uname -r)
Travitron

module-assistant也为我做了。在Ubuntu中,我也这样做virtualbox-dkms
jonpeck'5

有时安装linux-header会显示错误消息“无法找到软件包”。在这种情况下,请运行以下命令:apt-get install linux-headers-<LATEST VERSION>-ubuntu-amd64apt-get install linux-image-<LATEST VERSION>-ubuntu-amd64
TheRookierLearner,2018年

0

来宾添加是VirtualBox安装的一部分。在Virtualbox界面中,单击:

Device -> Insert Guest Additions -> CD Image.

现在,从来宾操作系统中,从来宾计算机中的CD运行来宾安装。


我也尝试过此过程。这没用。我遇到了与上述相同的问题。
thxmike

插入映像后运行CD时会遇到什么错误?
LD詹姆斯

我已经更新了前面的问题,该问题也表明在插入来宾添加CD时出现问题
thxmike

@thxmike执行此安装时,您是否在客户机中?
LD詹姆斯

要回答上述问题,是的,我在客户机上。
thxmike

0

我有这个问题。为了修复它,我确实将文件VBoxLinuxAdditions.run复制到/ root /文件夹,并将文件许可权更改为755。此外,我还安装了必备组件“ build-essential module-assistant linux-headers-$(uname -r)”。 。之后安装成功。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.