環境
- Debian 12 ( gnome ) Stable
- VirtualBox 6.1.48_Ubuntu r159471
Guest Additions CD
「Guest Additions CD イメージを挿入」として、 CD をマウント
ファイルマネージャから開くと VBoxLinuxAdditons.run が見える。これをダブルクリックして実行。
エラー
以下のようにエラーが出る。
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.48 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: S etting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
6.1.0-21-amd64. Please install them and execute
/sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
エラー対処。以下のようにして Kernel headers をインストール。
# uname -r
6.1.0-21-amd64
# apt search linux-headers-$(uname -r)
Sorting... Done
Full Text Search... Done
linux-headers-6.1.0-21-amd64/stable-security 6.1.90-1 amd64
Header files for Linux 6.1.0-21-amd64
# apt install linux-headers-$(uname -r)
再度 VBoxLinuxAdditons.run を実行して再起動