ubuntu20.04にvirtualboxをインストールする際にkernel driver(rc=-1908)エラーが出る
Kernel driver not installed (rc=-1908) インストールエラー
起動時にエラーが出る
このようなエラーが出て詰まった。
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing 'modprobe vboxdrv' as root.
最新のvirtualboxを入れるようにする
sudo add-apt-repository "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib" sudo wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - sudo apt-get update sudo apt-get install virtualbox-6.1
公式でも同じように言われているみたい。
https://www.virtualbox.org/wiki/Linux_Downloads
最新版をインストールしてもまだエラーが出る
/sbin/vboxconfigを実行しろと出る
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 '/sbin/vboxconfig' as root.
kernel-headerをインストールする
sudo apt install linux-headers-generic linux-headers-$(uname -r)
エラーが出る
E: Package 'linux-headers-(5.15.)-generic' has no installation candidate
アップデートして解決する
sudo apt update reboot