vagrant upでVirtualBox Guest Additionsのエラーが出た話
/ 1 min read
Table of Contents
問題
vagrant upでVirtualBox Guest Additionsのエラーが出た話です。
エラー内容
VirtualBox Guest Additions: Kernel headers not found for target kernel5.4.0-73-generic. Please install them and execute /sbin/rcvboxadd setup
解決方法
$ sudo apt && sudo apt upgrade -y$ sudo apt install -y linux-headers-generic
これでいったん vagrant reload したところ、新たなエラーが出ました。
VirtualBox Guest Additions: Building the modules for kernel 5.4.0-77-generic.
This system is currently not set up to build kernel modules.Please install the gcc make perl packages from your distribution.
さらに解決方法
$ sudo apt install -y gcc make perl
これで無事エラーが解消されました。
参考
【解決方法】Vagrant で構築した Ubuntu20.04 へ synced_folder を設定した際に発生するマウントエラーの対処 | とあるクリエイターのエンジニアブログ