首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为虚拟机安装linux“头”文件?

如何为虚拟机安装linux“头”文件?
EN

Unix & Linux用户
提问于 2018-12-08 03:27:31
回答 1查看 2.6K关注 0票数 -1

我在运行Debian 9的桌面上安装了virtualbox,并下载了导入到virtualbox中的虚拟机文件。问题是,当我尝试启动VM时,它告诉我在终端中运行'/sbin/vboxconfig‘,所以我这样做了,我得到了以下结果:

代码语言:javascript
复制
root@MaxPC:/home/maxwell# /sbin/vboxconfig
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.18.0-0.bpo.1-amd64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.18.0-0.bpo.1-amd64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

然后,我运行了'sudo apt-get install linux-headers 4.18.0-0.bpo.1-amd64 64‘来查看它是否能够修复,但我得到了以下结果:

代码语言:javascript
复制
root@MaxPC:/home/maxwell# sudo apt-get install linux-headers-4.18.0-0.bpo.1-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-headers-4.18.0-0.bpo.1-amd64 : Depends: linux-compiler-gcc-6-x86 (>= 4.14.17-1~) but 4.9.130-2 is to be installed
E: Unable to correct problems, you have held broken packages.

我该怎么做才能让我的船民开始工作?

EN

回答 1

Unix & Linux用户

发布于 2018-12-08 06:47:04

正如在这个错误报告中提到的,您需要指定一个目标版本。尝试:

代码语言:javascript
复制
sudo apt-get install -t stretch-backports linux-headers-4.18.0-0.bpo.1-amd64
票数 3
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/486711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档