摘要:本文将带你了解Vmware虚拟机教程之fedora 14 安装VM tools 问题:Even if the module were to compile successfully, it would not load into the running kernel.,希望本文对大家学Vmware有所帮助。
本文将带你了解Vmware虚拟机教程之fedora 14 安装VM tools 问题:Even if the module were to compile successfully, it would not load into the running kernel.,希望本文对大家学Vmware有所帮助。
摘要:
VMware的作用不用介绍了,像dorainm这种自己摆弄系统底层的,经常用vmware弄个freeBSD、linux-2.4.x、linux-2.6.x之类的玩!
标签:
VMware
Linux
内核头文件
VMware的作用不用介绍了,像 dorainm这种自己摆弄系统底层的,经常用 vmware弄个freeBSD、linux-2.4.x、linux-2.6.x之类的玩!
大家在安装vmware后,运行vmware-config.pl,经常会卡在内核头文件这里
None of the pre-
built vmmon modules for
VMware Workstation is suitable for
your running kernel.
Do
you want this program to try to build the vmmon module for
your system
(
you need to have a C compiler installed on your system
)
?
[
yes]
Using compiler "/usr/bin/gcc"
.
Use
environment variable CC to override.
What is the location of the directory of C header files that match your running kernel?
[
/
usr/
src/
linux/
include]
The path "/usr/src/linux/include"
is not
an existing directory.
What is the location of the directory of C header files that match your running kernel?
[
/
usr/
src/
linux/
include
] /root/sources/linux-2.6.22.2/include
The directory of kernel headers (
version @
@
VMWARE
@
@
UTS_RELEASE)
does not
match your running kernel (
version 2.
6.
22.
2)
.
Even if
the module were to compile successfully,
it would not
load into the running kernel.
What is the location of the directory of C header files that match your running kernel?
[
/
usr/
src/
linux/
include]
可气吧!明明修改指向我自己编译用过了的linux内核文件夹了,但是提示还是错误(dorainm使用的内核是2.6.22.2)
The directory of kernel headers (
version @
@
VMWARE
@
@
UTS_RELEASE)
does not
match your running kernel (
version 2.
6.
22.
2)
.
Even if
the module were to compile successfully,
it would not
load into the running kernel.
打开 linux/version.h 一看,内容是
#
define
LINUX_VERSION_CODE 132630#
define
KERNEL_VERSION(
a,
b,
c)
(
(
(
a)
<
<
16)
+
(
(
b)
<
<
8)
+
(
c)
)
2.6.22内核 = 2<<16 + 6<<8 + 22 = 2*65536 + 6*256 + 22 =132630
为什么说版本不对阿?!难道版本算法不同?!(bc:谁在掐我的指头!)
再次看,vmware读取的版本,UTS_RELEASE!我们往 linux/version.h 里面添加一行:
#
define
UTS_RELEASE "2.6.22.2"
#
define
LINUX_VERSION_CODE 132630#
define
KERNEL_VERSION(
a,
b,
c)
(
(
(
a)
<
<
16)
+
(
(
b)
<
<
8)
+
(
c)
)
这次 vmware终于相信 dorainm提供给它的内核头文件的版本是匹配的。
dorainm现在使用的 linux系统是自己编译的,如果安装的是发行版本,应该有相关的安装内核头文件的方法,比如 redhat/fedora系列的 yum, debian/ubuntu系列的 apt等
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标系统运维之Vmware频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号