我从 Ubuntu 15.10 升级到 16.04,从那时起 VirtualBox 5.0.18 不再启动我的 VM。它抱怨未加载“vboxdrv”。所以我尝试加载它并收到以下错误:
$ sudo modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Required key not available
Run Code Online (Sandbox Code Playgroud)
我相信这与我使用的安全启动有关并且我想继续使用它。实际上使用 Ubuntu 15.10 安全启动和 VirtualBox 工作得很好。
我也试过$ sudo apt-get --reinstall install virtualbox-dkms
哪个成功构建了内核模块但没有解决这个问题。
知道如何在启用安全启动的同时加载 vboxdrv 吗?
更新 2:我也尝试执行sudo mokutil --disable-validation
. 执行此命令时,在下次启动期间,我会收到禁用安全启动、从磁盘添加密钥或哈希的提示。由于我不想禁用安全启动,因此这似乎也不能解决我的问题。此外,我想为并行 Windows 安装保持 UEFI 激活。
注意:如果您不介意禁用安全启动,请参阅为什么在安装 3rd 方内核模块或内核升级后会出现“所需密钥不可用”?反而。
此问题仅发生在启用了安全启动的 UEFI 系统上。
当我尝试安装诸如 VirtualBox、Nvidia 或 Broadcom 驱动程序之类的 DKMS 模块时,它们不会安装,Required key not available
当我尝试安装它们时,我会安装modprobe
。
VirtualBox 抱怨vboxdrv
未加载。
Broadcomwl
驱动程序显示lspci -k
为内核模块,但未使用。sudo modprobe wl
抛出Required key not available
。
当我从 git 源安装一些内核模块时,也可能发生这个问题。
内核更新后可能会出现此问题,如禁用无线适配器、重启后黑屏等。
我该如何解决?
有时,我的系统会进入某些内核缺少一两个模块的状态,因为 DKMS 不知何故忘记为该内核编译这些模块。与其花时间诊断问题,还不如有一个我可以运行的单一命令,该命令只需为每个已安装的内核重建每个dkms 控制的模块。有这样的命令吗?
在最近apt-get dist-upgrade
的 12.10 中,我收到以下错误:
Setting up linux-headers-3.5.0-19-generic (3.5.0-19.30) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.5.0-19-generic /boot/vmlinuz-3.5.0-19-generic
Error! Could not locate dkms.conf file.
File: does not exist.
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我最近看到一些关于 DKMS 的提及,但不清楚它在我的系统上实际做什么。
DKMS 实际上有什么作用,我该如何使用它?
因此,我尝试使用 VirtualBox 创建操作系统,但出现此错误:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
Run Code Online (Sandbox Code Playgroud)
所以我做了显而易见的事情,运行 Vboxdrv 设置。我运行了这个命令:
sudo service vboxdrv setup
Run Code Online (Sandbox Code Playgroud)
我这样做时出错。:
stopping kernel drivers...done.
Uninstalling old …
Run Code Online (Sandbox Code Playgroud) 我正在运行 Ubuntu 20.04,最近进行了一次 dist 升级。
uname -r: 5.8.0-34-generic
Run Code Online (Sandbox Code Playgroud)
我通过以下方式清除了 Virtualbox 和关联文件:
sudo apt-get purge "^virtualbox-.*"
Run Code Online (Sandbox Code Playgroud)
尝试重新安装任何软件后,我现在得到以下信息:
>>$ sudo apt install --reinstall linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1,236 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 328260 files and …
Run Code Online (Sandbox Code Playgroud) 我的基于 Ubuntu 的发行版预装了一些 VirtualBox 的东西,所以我卸载了它,它自动删除了 DKMS 包。
从我看到的来看,它看起来像是有用的包,但我需要它吗?像 VirtualBox 和 CDemu 这样的东西自己安装它,而 Ubuntu 默认没有安装它,所以我猜它只有一些安装模块或其他东西的程序“需要”。
我不是一个长期的 GNU/Linux 用户,所以我没有太多的经验,我什至没有编译的经验。
现在我有一个 Linux 内核更新待处理,但我不知道是否应该在没有安装 DKMS 的情况下更新它。
升级到下一个 linux 镜像后,aptitude 输出了以下几行:
Setting up linux-image-3.16.0-38-generic (3.16.0-38.52~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-38-generic /boot/vmlinuz-3.16.0-38-generic
: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
Error! Problems with depmod detected. Automatically uninstalling …
Run Code Online (Sandbox Code Playgroud)