此系统当前未设置为构建内核模块。请从您的发行版安装 gcc make perl 包

此系统当前未设置为构建内核模块。请从您的发行版安装 gcc make perl 包

我正在尝试插入 Guest Additions CD 映像,然后运行 ​​VBoxLinuxAdditions.run

我是 Ubuntu 新手,正在努力学习。我正在通过 Oracle VM v6.04r 运行 Ubuntu 18.04LTS。我的主机笔记本电脑运行的是 Windows 10 Pro。所以我转到设备>插入 Guest Additions CD 映像。这在我的 Ubuntu 桌面上创建了 Vbox_GAs_6.0.4。然后我尝试通过终端运行 VBoxLinuxAdditions.run 并出现以下消息。

arijitpc@arijitpc-VirtualBox:/media/arijitpc/VBox_GAs_6.0.4$ sudo ./VBoxLinuxAdditions.run
[sudo] password for arijitpc:
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.4 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.4 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: Building the modules for kernel 4.18.0-18-generic.

This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the modules for kernel 4.18.0-18-generic.

**This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.**

请您帮助我该怎么做。网上有很多信息,但大多数都不起作用,令人困惑。还请您提供我在终端上运行所需的命令,因为我对 Ubuntu/Linux 环境中的大多数术语都不熟悉。

答案1

您可能需要安装这两个包:virtualbox-guest-utils 和 virtualbox-guest-dkms

通过此终端命令将需要几秒钟:

sudo apt install virtualbox-guest-utils virtualbox-guest-dkms

然后按照你的方法再次执行sudo ./VBoxLinuxAdditions.run,它就应该可以正常工作了;)

相关内容