无法在Ubuntu 14.04上安装VBoxGuestAdditions 5.1.0

Modified on: Thu, 14 Jun 2018 06:33:53 +0800

下载以下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.

这会使系统处于不良状态,除了重新开始使用图像之外无法恢复。

作者:,thxmike

最佳答案

似乎有一些先决条件你没有实现
就像是:
apt-get install build-essential module-assistant linux-headers-$(uname -r)

它对我有用。


相关问答

添加新评论