RHEL:此系统当前未设置为构建内核模块 [英] RHEL: This system is currently not set up to build kernel modules

查看:49
本文介绍了RHEL:此系统当前未设置为构建内核模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 RHEL 7 VM 上安装 virtualbox5.2 当我尝试重建内核模块时,我收到以下错误:

I am trying to install virtualbox5.2 on a RHEL 7 VM When I try to rebuild kernels modules I get the following error:

[root@myserver~]# /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping 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:
    kernel-devel kernel-devel-3.10.0-693.11.1.el7.x86_64

我尝试安装 kernet-devel 并收到成功消息

I tried install kernet-devel and got success message

Installed:
  kernel-devel.x86_64 0:3.10.0-693.21.1.el7                                     

Complete!

但设置仍然失败.

知道这里缺少什么吗?

推荐答案

sudo yum install -y "kernel-devel-$(uname -r)"

在 Fedora 上替换 dnf.我不需要重新启动,但是 ymmv.

Substitute dnf on Fedora. I didn't need to do a reboot, but ymmv.

2020 年

Centos/RHEL 8 现在也使用 dnf 而不是 yum.我没有机会在这些发行版上测试这个,所以同样的 YMMV 免责声明仍然适用.

Centos/RHEL 8 now also use dnf instead of yum. I haven't had occasion to test this on those distros, so the same YMMV disclaimer still applies.

这篇关于RHEL:此系统当前未设置为构建内核模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆