解決VirtualBox無法共享貼上板的問題(Debian)
一直使用 VirtualBox
安裝的 Debian
環境編譯 WD MyCloud
的程式碼。但是最近 VirtualBox
升級後,升級增強功能,然後共享貼上板就不能使用了。
如果執行
$ VBoxClient --clipboard
可看到錯誤資訊:
VBoxClient: Failed to connect to the VirtualBox kernel service, rc=VERR_FILE_NOT_FOUND
如下圖:

重新執行安裝,才注意到如下錯誤資訊:
longsky@debian:/media/cdrom0$ sudo bash VBoxLinuxAdditions.run [sudo] password for longsky: Verifying archive integrity... All good. Uncompressing VirtualBox 5.2.20 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 5.2.20 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: linux-headers-amd64 linux-headers-3.16.0-7-amd64 update-initramfs: Generating /boot/initrd.img-3.16.0-7-amd64 VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: linux-headers-amd64 linux-headers-3.16.0-7-amd64 update-initramfs: Generating /boot/initrd.img-3.16.0-7-amd64
原來是缺少了編譯依賴的核心標頭檔案,導致升級失敗,而且以前版本已經安裝好的版本卻已經被刪除了。
這部分標頭檔案以前是存在的,但是隨著系統核心的升級更新,標頭檔案卻沒有自動被更新,導致這個問題。
執行如下命令安裝缺少的軟體包:
$ sudo apt-get install linux-headers-amd64
參考連結
ofollow,noindex" target="_blank">Bidirectional Drag and Drop/Shared Clipboard is not working with VirtualBox Kali Linux