解决”找不到相应内核头文件,无法安装VirtualBox客户端增强组件”

方法:

1. 安装Dynamic Kernel Module Support (DKMS) 和当前内核头文件:

sudo apt-get install dkms
sudo apt-get install linux-headers-`uname -r|cut -d'-' -f3`-`uname -r|cut -d'-' -f4`

 

2. 重新安装 virtualbox additions

sudo /media/VBOXADDITIONS_4.1.22_80657/VBoxLinuxAdditions.run

# replace the command with the actual path of Additions installer

 

3. 删除/注释所有除 “800×600″之外的显示配置:

# VirtualBox generated configuration file
# based on /etc/X11/xorg.conf.

Section "Monitor"
Identifier "Monitor[0]"
ModelName "VirtualBox Virtual Output"
VendorName "Oracle Corporation"
EndSection

Section "Device"
BoardName "VirtualBox Graphics"
Driver "vboxvideo"
Identifier "Device[0]"
VendorName "Oracle Corporation"
EndSection

Section "Screen"
# SubSection "Display"
# Depth 24
# Modes "1280x800"
# EndSubSection
# SubSection "Display"
# Depth 24
# Modes "1680x1050"
# EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSection

4. 重启虚拟机。。。完毕!

你可能感兴趣的:(解决”找不到相应内核头文件,无法安装VirtualBox客户端增强组件”)