Ubuntu Server 11.10 安装增强功能

1) 安装编译环境
$ sudo apt-get install build-essential

2) 执行增强功能安装脚本。

出现如下错误提示:
Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)

根据错误提示打开 /var/log/vboxadd-install.log 文件, 可以看到如下错误提示信息:
/tmp/vbox.0/Makefile.include.header:94:***Error:unable to find the sources of your current Linux kernal.Specify KERN_DIR=<directory> and run Make again. 停止。
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

解决办法:
1) 查出当前系统内核的版本号
$ uname -r
2.6.32-36-generic

安装内核版本的头文件和一部分源码,因为 virtualbox 的驱动等也是内核模块:
$ sudo apt-get install linux-headers-2.6.32-36-generic

2) 再执行一遍增强功能安装脚本,应该就没什么问题了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/pxyfz.html