vbox

* Stopping VirtualBox kernel modules                                    [ OK ]
 * Uninstalling old VirtualBox DKMS kernel modules                       [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS                  Error! Your kernel headers for kernel 2.6.38 cannot be found.
Please install the linux-headers-2.6.38 package,
or use the --kernelsourcedir option to tell DKMS where it's located

 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                        
 * Look at /var/log/vbox-install.log to find out what went wrong


# cat /var/log/vbox-install.log
Makefile:169: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.



# ll /lib/modules/2.6.38/


drwxr-xr-x  4 root root   4096 2012-06-20 13:04 ./
drwxr-xr-x  4 root root   4096 2012-06-20 12:59 ../
lrwxrwxrwx  1 root root     14 2012-06-20 12:35 build -> /usr/src/linux
drwxr-xr-x 10 root root   4096 2011-03-19 13:41 kernel/
-rw-r--r--  1 root root 675129 2012-06-20 13:04 modules.alias
-rw-r--r--  1 root root 653896 2012-06-20 13:04 modules.alias.bin
-rw-r--r--  1 root root   5646 2011-03-18 09:34 modules.builtin
-rw-r--r--  1 root root   6664 2012-06-20 13:04 modules.builtin.bin
-rw-r--r--  1 root root     69 2012-06-20 13:04 modules.ccwmap
-rw-r--r--  1 root root 309481 2012-06-20 13:04 modules.dep
-rw-r--r--  1 root root 456671 2012-06-20 13:04 modules.dep.bin
-rw-r--r--  1 root root    665 2012-06-20 13:04 modules.ieee1394map
-rw-r--r--  1 root root    295 2012-06-20 13:04 modules.inputmap
-rw-r--r--  1 root root  25711 2012-06-20 13:04 modules.isapnpmap
-rw-r--r--  1 root root     74 2012-06-20 13:04 modules.ofmap
-rw-r--r--  1 root root 123806 2011-03-18 09:34 modules.order
-rw-r--r--  1 root root 432531 2012-06-20 13:04 modules.pcimap
-rw-r--r--  1 root root   1723 2012-06-20 13:04 modules.seriomap
-rw-r--r--  1 root root 247451 2012-06-20 13:04 modules.symbols
-rw-r--r--  1 root root 314768 2012-06-20 13:04 modules.symbols.bin
-rw-r--r--  1 root root 992069 2012-06-20 13:04 modules.usbmap
drwxr-xr-x  3 root root   4096 2012-06-19 10:04 updates/




/usr/share/virtualbox/src/vboxhostvboxdrv/Makefile


ifndef KERN_DIR

  # build for the current kernel, version check
  KERN_DIR := /lib/modules/$(shell uname -r)/build
  ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
   KERN_DIR := /usr/src/linux
   ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
    $(error Error: unable to find the sources of your current Linux kernel. \

               Specify KERN_DIR=<directory> and run Make again)


#ls /usr/src

linux  linux-headers-2.6.38  linux-headers-3.2.6  


#ln -s linux-headers-2.6.38 linux

create softlink





主要是将KERN_DIR 设置好即可编译vboxdrv    DKMS


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值