gpt4 book ai didi

linux - 我无法执行命令 modprobe vboxdrv

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:44:46 28 4
gpt4 key购买 nike

我最近升级了我的 laravel vagrant box。从那以后,Virtual box 给我同样的错误

The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below:

VirtualBox is complaining that the installation is incomplete. Please run VBoxManage --version to see the error message which should contain instructions on how to fix this error.

所以,做了一点研究,我发现内核驱动程序不可用。我尝试安装它并在它尝试执行 modprobe vboxdrv 时出现以下错误。

modprobe: ERROR: could not insert 'vboxdrv': Required key not available

我有 4 天时间遇到此错误,但我不知道该怎么办。有人可以帮助我吗?

最佳答案

这是另一种解决方案,无需禁用安全启动:

问题是 vboxdrv 模块没有签名,因此没有加载内核。如果您的计算机激活了 SecureBoot 模式,就会发生这种情况,这在现代设备中很常见。

这就是为什么我在 Virtual Box 中打开任何机器时都会出现此错误

Kernel driver not installed (rc=-1908)

执行以下步骤对驱动程序进行签名,并将其作为内核模块加载:

1.安装mkutil包即可做签名。

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mokutil

2.生成签名文件:

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"

3.然后加入内核:

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)

4. 为安全启动注册它。

重要!这将要求您输入密码,输入您想要的密码,下次重启时您只需使用一次。

sudo mokutil --import MOK.der

5. 最后,重新启动计算机。将出现蓝屏并等待键盘,按下要求您中断启动的键。

enter image description here

当你在蓝屏内时,选择

Enroll MOK > Continue > Yes > and it will ask you for the password

你之前输入过,你再输入,你会被提示操作已经成功完成。

现在您的操作系统将启动,您现在可以毫无问题地使用 VirtualBox :)

我在 Ubuntu、Kubuntu 和 Debian 中对此进行了测试。希望这对某人有所帮助。

关于linux - 我无法执行命令 modprobe vboxdrv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38437264/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com