vbox共享剪贴板不行_解决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

参考链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值