我找不到有关此问题的任何信息,因此当我解决此问题时,我想将其和答案发布在 AskUbuntu 上,以防其他人遇到同样的问题。
Virtualbox 拒绝启动任何虚拟机;告诉我/etc/init.d/vboxdrv setup
以 root 身份运行。这样做导致:
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File: does not exist.
...done.
Trying to register the VirtualBox kernel modules using DKMSError! DKMS tree already contains: vboxhost-4.3.18
You cannot add the same module/version combo more than once.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
答案1
与依赖项相比,virtualbox 版本已过时。需要完全重新安装。但首先我备份了我的 dkms 配置并将其删除:
mkdir ~/backup_dkms
cp -r /var/lib/dkms/* ~/backup_dkms
rm -rf /var/lib/dkms/vboxhost
然后经过一番探索,运行 apt update、upgrade 和 autoremove 之后,我终于运行了:
sudo apt install virtualbox
现在它运行完美。