我也不知道啥时候自动给我更新了内核,重启电脑之后我的内核升级成6.5.0-14-generic
,导致Virtual Box
无法找到内核文件。
sudo apt update
sudo apt install linux-headers-generic build-essential dkms
sudo apt remove virtualbox-dkms
sudo apt install virtualbox-dkms
博主尝试该方法不可行,删除virtualbox-dkms
后,无法再次安装virtualbox-dkms
,总是提示下面的问题:
Loading new virtualbox-6.1.10 DKMS files...
Building for 5.8.0-36-generic
Building initial module for 5.8.0-36-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-36-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
virtualbox-dkms
删除所有关于virtual box的软件,并且从官网下载最新版本进行安装。
sudo apt remove virtualbox
sudo apt autoremove
不要通过apt安装virtualbox了,下载最新版本安装https://www.virtualbox.org/wiki/Linux_Downloads
sudo dpkg -i virtualbox-7.0_7.0.12-159484~Ubuntu~jammy_amd64.deb
sudo apt install -f
可以正常启动了