安装 VirtualBox 客户机附加功能时构建主客户机附加功能模块时出错

安装 VirtualBox 客户机附加功能时构建主客户机附加功能模块时出错

我已经使用 VirtualBox 在 Ubuntu 12.04 主机上安装了 Ubuntu 12.10 Guest。所有内容均来自存储库,无需直接安装。当我安装 Guest Additions 时,控制台中显示以下错误。在运行命令之前,我在 Guest 中映射了 VBoxGuestAdditions.iso。

我能得到的最接近的是文章说要安装最新版本的 VirtualBox(不是来自存储库的版本)。还有其他解决方案吗?

sudo ./VBoxLinuxAdditions.run

Verifying archive integrity... All good.  
Uncompressing VirtualBox 4.1.12 Guest Additions for Linux.........  
VirtualBox Guest Additions installer  
Removing installed version 4.1.12 of VirtualBox Guest Additions...  
Removing existing VirtualBox DKMS kernel modules ...done.  
Removing existing VirtualBox non-DKMS kernel modules ...done.  
Building the VirtualBox Guest Additions kernel modules  
The headers for the current running kernel were not found. If the following  
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!  
(Look at /var/log/vboxadd-install.log to find out what went wrong)  
Doing non-kernel setup of the Guest Additions ...done.  
Installing the Window System drivers  
Warning: unknown version of the X Window System installed.  Not installing  
X Window System drivers.  
Installing modules ...done.  
Installing graphics libraries and desktop services components ...done.

答案1

适用于 VirtualBox 版本 4.2.0。Oracle 的版本。

安装该软件包virtualbox-guest-x11然后你就没问题了。

在此处输入图片描述

从终端(虚拟系统)

sudo apt-get install virtualbox-guest-x11

重新启动虚拟系统。

答案2

尽管安装了“完整的通用 Linux 内核和标头”(Ubuntu 12.10 在 Windows Server 2003/Q6600 上的 VirtualBox 下运行),但我还是收到了可怕的“未找到当前正在运行的内核的标头”消息。所以我查看了这个页面...

为了清楚起见,对于你们这些复制粘贴者来说(也包括我,因此我发现需要做一点澄清),准确的命令是:

sudo apt-get install build-essential linux-headers-`uname -r` dkms

这进一步意味着在“设备”下首先将“共享剪贴板”打开为“双向”(为了易于使用)

然后打开一个终端窗口(单击顶部的“Dash”按钮,在搜索框中输入“terminal”,单击终端图标即可打开)

然后通过在终端窗口中单击鼠标右键,将上述 sudo apt-get 命令复制/粘贴到终端窗口中

然后在提示时输入你的 root/admin 密码

然后通过 VirtualBox 安装设备/客户添加

并且,与上述顺序无关,但仍与 Guest Additions 有关,最新/最棒的版本始终可以从以下位置下载/安装为 CD:

http://download.virtualbox.org/virtualbox/

Ubuntu 12.10 的附加信息,因为我后来发现我必须

  1. apt-get purge xserver-xorg-video-vmware

  2. 从 4.6.2 .iso 重新安装客户添加程序(可从上述 URL 获得)

  3. 在 /etc/modules 中添加“vboxvideo”(我

    sudo gedit /etc/modules
    

    但可以

    sudo bash -c 'echo vboxvideo >> /etc/modules' 
    

  4. 停止虚拟机

  5. 设置/显示/启用 3D 加速

以获得更好的性能。现在我得到:

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

以及一些与命令中的 mesa 表相关的不太令人愉快的 OpenGL 警告

/usr/lib/nux/unity_support_test -p

答案3

  1. 启动终端并输入:

    sudo apt-get install build-essential linux-headers-`uname -r` dkms
    
  2. 然后重新安装VirtualBox 客户机添加设备 → 安装 Guest Addition

在 Windows 7 上以 VirtualBox 2.2.4 作为主机进行测试

答案4

将 VirtualBox 升级到最新版本,问题已解决。Guest Additions 安装现在正常。

相关内容