无法安装 Lubuntu 的访客添加功能

无法安装 Lubuntu 的访客添加功能

我在 Virtual Box 中以虚拟机的形式运行 Lubuntu。我遇到的问题是尝试安装客户机附加功能。

当我跑步时uname -r我得到:

3.11.0-14-generic

这是我的日志/var/lib/dkms/vboxguest/4.2.4/build/make.log

DKMS make.log for vboxguest-4.2.4 for kernel 3.11.0-14-generic (i686)
Fri Mar 14 18:11:21 EDT 2014
make: Entering directory `/usr/src/linux-headers-3.11.0-14-generic'
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.
make: Leaving directory `/usr/src/linux-headers-3.11.0-14-generic'

每当我尝试时apt-get install 3.11.0-14-generic,我都会得到这个,我在 make 中得到这个错误。这是我的 apt-get 日志:

Log started: 2014-03-14 18:11:10
Selecting previously unselected package linux-headers-3.11.0-14-generic.
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading d
Unpacking linux-headers-3.11.0-14-generic (from .../linux-headers-3.11.0-14-generic_3.11.0-14.21_i386.deb) ...
Setting up linux-headers-3.11.0-14-generic (3.11.0-14.21) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.11.0-14-generic /boot/vmlinuz-3.11.0-14-generic
ERROR (dkms apport): binary package for vboxguest: 4.2.4 not found
Error! Bad return status for module build on kernel: 3.11.0-14-generic (i686)
Consult /var/lib/dkms/vboxguest/4.2.4/build/make.log for more information.
Log ended: 2014-03-14 18:11:25

对于我的 vbox 安装,这是我的日志:

Uninstalling modules from DKMS
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxguest/4.2.4/source ->
/usr/src/vboxguest-4.2.4
DKMS: add completed.
Error! Your kernel headers for kernel 3.11.0-14-generic cannot be found.
Please install the linux-headers-3.11.0-14-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Failed to install using DKMS, attempting to install without
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

答案1

也许 VirtualBox 的版本对于客户机来说太旧了。我从 VirtualBox 下载了一个新的 VBoxGuestAdditions.iso:

http://download.virtualbox.org/virtualbox/4.3.8/VBoxGuestAdditions_4.3.8.iso

您可以安装较新的 iso 并重试。

答案2

尝试这个:

$ sudo apt-get update

$ sudo apt-get install build-essential linux-headers-$(uname -r)

然后,再次尝试安装客户添加功能。

答案3

要更新内核,您可以使用:

sudo apt-get install linux-generic

如果您需要此特定版本,可以在这里找到(linux-headers-3.11.0-14-generic)。

可以通过运行以下命令来安装:

sudo apt-get install linux-headers-3.11.0-14-generic

来自VirtualBox manual,第 4 章(新增嘉宾), 部分Installing the Linux Guest Additions

乌本图:

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install dkms

重新启动您的客户系统以激活更新,然后按上述说明进行操作:

  • VBoxGuestAdditions.isoCD 文件插入 Linux 客户机的虚拟 CD-ROM 驱动器 [如果“存储”选项卡显示它已连接到虚拟机,请不要执行此操作]
  • 打开终端,更改为安装 CD-ROM 驱动器的目录,然后以 root 身份执行:sh ./VBoxLinuxAdditions.run

相关内容