LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 959|回复: 9

F9 (KDE)下VM虚拟机问题

[复制链接]
发表于 2008-5-17 22:23:53 | 显示全部楼层 |阅读模式
虚拟机版本6.0.3,无论用1.15的补丁还是1.16的均出错,无奈中,(已安装gcc4.3,kernel-devel,head)
[root@Home-PC vm]# ./runme.pl
Updating /usr/bin/vmware ... No patch needed/available
Updating /usr/bin/vmnet-bridge ... No patch needed/available
Updating /usr/lib/vmware/bin/vmware-vmx ... No patch needed/available
Updating /usr/lib/vmware/bin-debug/vmware-vmx ... No patch needed/available
VMware modules in "/usr/lib/vmware/modules/source" has been updated.

Before running VMware for the first time after update, you need to configure it
for your running kernel by invoking the following command:
"/usr/bin/vmware-config.pl". Do you want this script to invoke the command for
you now? [yes]

Making sure services for VMware Workstation are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [确 定 ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

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? [/lib/modules/2.6.25.3-18.fc9.i686/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Unknown VMware Workstation 6.0.3 build 80004 detected. Building for Workstation 6.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config3/vmmon-only'
make -C /lib/modules/2.6.25.3-18.fc9.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
  CC [M]  /tmp/vmware-config3/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config3/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config3/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config3/vmmon-only/common/task.o
gcc: error trying to exec 'cc1plus': execvp: 没 有 那 个 文 件 或 目 录
make[2]: *** [/tmp/vmware-config3/vmmon-only/common/task.o] 错 误  1
make[1]: *** [_module_/tmp/vmware-config3/vmmon-only] 错 误  2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
make: *** [vmmon.ko] 错 误  2
make: Leaving directory `/tmp/vmware-config3/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.

[root@Home-PC vm]# cd /home/vaxell/vm1
[root@Home-PC vm1]# ./runme.pl
Updating /usr/bin/vmware ... No patch needed/available
Updating /usr/bin/vmnet-bridge ... No patch needed/available
Updating /usr/lib/vmware/bin/vmware-vmx ... No patch needed/available
Updating /usr/lib/vmware/bin-debug/vmware-vmx ... No patch needed/available
VMware modules in "/usr/lib/vmware/modules/source" has been updated.

Before running VMware for the first time after update, you need to configure it
for your running kernel by invoking the following command:
"/usr/bin/vmware-config.pl". Do you want this script to invoke the command for
you now? [yes]

Making sure services for VMware Workstation are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [确 定 ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

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? [/lib/modules/2.6.25.3-18.fc9.i686/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Unknown VMware Workstation 6.0.3 build 80004 detected. Building for Workstation 6.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmmon-only'
make -C /lib/modules/2.6.25.3-18.fc9.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
  CC [M]  /tmp/vmware-config4/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config4/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config4/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config4/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config4/vmmon-only/common/cpuid.o
在 包 含 自  /tmp/vmware-config4/vmmon-only/./include/vcpuset.h: 74 的 文 件 中 ,
                 从  /tmp/vmware-config4/vmmon-only/./include/modulecall.h: 23,
                 从  /tmp/vmware-config4/vmmon-only/common/vmx86.h: 19,
                 从  /tmp/vmware-config4/vmmon-only/common/hostif.h: 18,
                 从  /tmp/vmware-config4/vmmon-only/common/cpuid.c: 15:
include/asm/bitops.h:9:2: 错 误 : #error only <linux/bitops.h> can be included directly
In file included from include/asm/cpufeature.h:118,
                 from include/asm/alternative.h:42,
                 from include/asm/bitops.h:13,
                 from /tmp/vmware-config4/vmmon-only/./include/vcpuset.h:74,
                 from /tmp/vmware-config4/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config4/vmmon-only/common/vmx86.h:19,
                 from /tmp/vmware-config4/vmmon-only/common/hostif.h:18,
                 from /tmp/vmware-config4/vmmon-only/common/cpuid.c:15:
include/linux/bitops.h: 在 函 数 ‘get_bitmask_order’中 :
include/linux/bitops.h:29: 错 误 : 隐 式 声 明 函 数 ‘fls’
include/linux/bitops.h: 在 函 数 ‘hweight_long’中 :
include/linux/bitops.h:45: 错 误 : 隐 式 声 明 函 数 ‘hweight32’
include/linux/bitops.h:45: 错 误 : 隐 式 声 明 函 数 ‘hweight64’
include/linux/bitops.h: 在 函 数 ‘fls_long’中 :
include/linux/bitops.h:112: 错 误 : 隐 式 声 明 函 数 ‘fls64’
In file included from include/asm/bitops.h:316,
                 from /tmp/vmware-config4/vmmon-only/./include/vcpuset.h:74,
                 from /tmp/vmware-config4/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config4/vmmon-only/common/vmx86.h:19,
                 from /tmp/vmware-config4/vmmon-only/common/hostif.h:18,
                 from /tmp/vmware-config4/vmmon-only/common/cpuid.c:15:
include/asm/bitops_32.h: 在 文 件 层 :
include/asm/bitops_32.h:135: 错 误 : 对 ‘fls’的 静 态 声 明 出 现 在 非 静 态 声 明 之 后
include/linux/bitops.h:29: 错 误 : ‘fls’的 上 一 个 隐 式 声 明 在 此
In file included from include/asm/bitops_32.h:145,
                 from include/asm/bitops.h:316,
                 from /tmp/vmware-config4/vmmon-only/./include/vcpuset.h:74,
                 from /tmp/vmware-config4/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config4/vmmon-only/common/vmx86.h:19,
                 from /tmp/vmware-config4/vmmon-only/common/hostif.h:18,
                 from /tmp/vmware-config4/vmmon-only/common/cpuid.c:15:
include/asm-generic/bitops/hweight.h:6: 错 误 : 与 ‘hweight32’类 型 冲 突
include/linux/bitops.h:45: 错 误 : ‘hweight32’的 上 一 个 隐 式 声 明 在 此
include/asm-generic/bitops/hweight.h:9: 错 误 : 与 ‘hweight64’类 型 冲 突
include/linux/bitops.h:45: 错 误 : ‘hweight64’的 上 一 个 隐 式 声 明 在 此
In file included from include/asm/bitops_32.h:149,
                 from include/asm/bitops.h:316,
                 from /tmp/vmware-config4/vmmon-only/./include/vcpuset.h:74,
                 from /tmp/vmware-config4/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config4/vmmon-only/common/vmx86.h:19,
                 from /tmp/vmware-config4/vmmon-only/common/hostif.h:18,
                 from /tmp/vmware-config4/vmmon-only/common/cpuid.c:15:
include/asm-generic/bitops/fls64.h:7: 错 误 : 对 ‘fls64’的 静 态 声 明 出 现 在 非 静 态 声 明 之 后
include/linux/bitops.h:112: 错 误 : ‘fls64’的 上 一 个 隐 式 声 明 在 此
make[2]: *** [/tmp/vmware-config4/vmmon-only/common/cpuid.o] 错 误  1
make[1]: *** [_module_/tmp/vmware-config4/vmmon-only] 错 误  2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
make: *** [vmmon.ko] 错 误  2
make: Leaving directory `/tmp/vmware-config4/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
有什么解决办法不,现谢了。
发表于 2008-5-18 01:22:21 | 显示全部楼层
需要给vmware打补丁,参看:http://bbs.archlinux.org/viewtopic.php?pid=367910
vmware的模块源码路径位于/usr/lib/vmware/modules/source

如果不知道怎么使用补丁,请继续往下看...

准备工作
先把下载好的三个patch文件拷贝到/usr/lib/vmware/modules/source下面。
然后把目录下的三个tar包备份(以备将来升级内核之后再打补丁)
  1. # cd /usr/lib/vmware/modules/source
  2. # cp vmmon.tar vmmon.tar.orig
  3. # cp vmnet.tar vmnet.tar.orig
  4. # cp vmblock.tar vmblock.tar.orig
复制代码
再解开
  1. # tar xvf vmmon.tar
  2. # tar xvf vmnet.tar
  3. # tar xvf vmblock.tar
复制代码

开工
patch(1)的手册里提到,常用的语法为 patch -pnum <patchfile
于是我们找到了对-p的选项描述
       -pnum  or  --strip=num
          Strip the smallest prefix containing num leading slashes from each file name found in the patch  file.
          A sequence of one or more adjacent slashes is counted as a single slash.  This controls how file names
          found in the patch file are treated, in case you keep your files in a  different  directory  than  the
          person who sent out the patch.  For example, supposing the file name in the patch file was

             /u/howard/src/blurfl/blurfl.c

          setting -p0 gives the entire file name unmodified, -p1 gives

             u/howard/src/blurfl/blurfl.c

          without the leading slash, -p4 gives

             blurfl/blurfl.c

          and  not  specifying -p at all just gives you blurfl.c.  Whatever you end up with is looked for either
          in the current directory, or the directory specified by the -d option.
-p后面指定的数字,表明要清除第几个(从左往右数)"/"前面(包括"/"本身)的路径字符。
-p就是用来剥离路径,以便让.patch文件里的描述的路径和当前系统路径对上。

简单的看一下我们的.patch补丁,以vmmon.patch的第一行为例:
"diff -c -r vmmon-only/include/vcpuset.h vmmon-only-new/include/vcpuset.h"
如果看懂了前面manual page的那段话,我们就知道现在应该指定 -p0 即可
  1. # patch -p0 < vmmon.patch
  2. # patch -p0 < vmblock.patch
  3. # patch -p0 < vmnet.patch
复制代码

接下来将打完补丁的文件重新打包替换原文件
  1. # rm -f vmmon.tar vmblock.tar vmnet.tar
  2. # tar cvf vmmon.tar vmmon-only
  3. # tar cvf vmblock.tar vmblock-only
  4. # tar cvf vmnet.tar vmnet-only
复制代码

清理工作:
  1. # rm -rf vmmon-only vmnet-only vmblock-only
复制代码

如果一切正常,接下来再编译就不会有问题了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-18 08:11:41 | 显示全部楼层
先谢谢,成功后再来
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-18 09:18:24 | 显示全部楼层
不行,这会是这样了。
[root@Home-PC vaxell]# cd /usr/bin
[root@Home-PC bin]# vmware-config.pl
Making sure services for VMware Workstation are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [确 定 ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

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? [/lib/modules/2.6.25.3-18.fc9.i686/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Unknown VMware Workstation 6.0.3 build 80004 detected. Building for Workstation 6.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config9/vmmon-only'
make -C /lib/modules/2.6.25.3-18.fc9.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
  CC [M]  /tmp/vmware-config9/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config9/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config9/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config9/vmmon-only/common/task.o
gcc: error trying to exec 'cc1plus': execvp: 没 有 那 个 文 件 或 目 录
make[2]: *** [/tmp/vmware-config9/vmmon-only/common/task.o] 错 误  1
make[1]: *** [_module_/tmp/vmware-config9/vmmon-only] 错 误  2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
make: *** [vmmon.ko] 错 误  2
make: Leaving directory `/tmp/vmware-config9/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
F9的问题的确比F8的稍多!
回复 支持 反对

使用道具 举报

发表于 2008-5-18 09:41:32 | 显示全部楼层
看看这样是否能行
  1. yum install gcc-c++
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-18 10:29:23 | 显示全部楼层
还是不行,如下:
[vaxell@Home-PC ~]$ su
密 码 :
[root@Home-PC vaxell]# cd /usr/bin/
[root@Home-PC bin]# vmware-config.pl
Making sure services for VMware Workstation are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [确 定 ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the theme icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

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? [/lib/modules/2.6.25.3-18.fc9.i686/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Unknown VMware Workstation 6.0.3 build 80004 detected. Building for Workstation 6.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config10/vmmon-only'
make -C /lib/modules/2.6.25.3-18.fc9.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/task.o
cc1plus: 警 告 : 命 令 行 选 项 “-Werror-implicit-function-declaration”对  C/ObjC 是 有 效 的 , 但 对  C++ 无 效
cc1plus: 警 告 : 命 令 行 选 项 “-Wdeclaration-after-statement”对  C/ObjC 是 有 效 的 , 但 对  C++ 无 效
cc1plus: 警 告 : 命 令 行 选 项 “-Wno-pointer-sign”对  C/ObjC 是 有 效 的 , 但 对  C++ 无 效
cc1plus: 警 告 : 命 令 行 选 项 “-Wstrict-prototypes”对  Ada/C/ObjC 是 有 效 的 , 但 对  C++ 无 效
In file included from /tmp/vmware-config10/vmmon-only/common/hostKernel.h:56,
                 from /tmp/vmware-config10/vmmon-only/common/task.c:30:
include/asm/page.h: In function ‘pte_t native_make_pte(pteval_t)’:
include/asm/page.h:128: 错 误 : expected primary-expression before ‘)’ token
include/asm/page.h:128: 错 误 : expected ‘;’ before ‘{’ token
include/asm/page.h:128: 错 误 : expected primary-expression before ‘.’ token
include/asm/page.h:128: 错 误 : expected `;' before ‘}’ token
In file included from include/asm/page.h:140,
                 from /tmp/vmware-config10/vmmon-only/common/hostKernel.h:56,
                 from /tmp/vmware-config10/vmmon-only/common/task.c:30:
include/asm/paravirt.h: In function ‘pte_t __pte(pteval_t)’:
include/asm/paravirt.h:955: 错 误 : expected primary-expression before ‘)’ token
include/asm/paravirt.h:955: 错 误 : expected ‘;’ before ‘{’ token
include/asm/paravirt.h:955: 错 误 : expected primary-expression before ‘.’ token
include/asm/paravirt.h:955: 错 误 : expected `;' before ‘}’ token
In file included from /tmp/vmware-config10/vmmon-only/common/task.c:1194:
/tmp/vmware-config10/vmmon-only/common/task_compat.h: At global scope:
/tmp/vmware-config10/vmmon-only/common/task_compat.h:9: 警 告 : 此 声 明 中 的  typedef 被 忽 略
make[2]: *** [/tmp/vmware-config10/vmmon-only/common/task.o] 错 误  1
make[1]: *** [_module_/tmp/vmware-config10/vmmon-only] 错 误  2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.3-18.fc9.i686'
make: *** [vmmon.ko] 错 误  2
make: Leaving directory `/tmp/vmware-config10/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.

[root@Home-PC bin]#
@@@   晕啊!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-18 16:28:41 | 显示全部楼层
希望有安转成功的朋友发帖子共享下,只能先谢了。
回复 支持 反对

使用道具 举报

发表于 2008-5-19 09:37:14 | 显示全部楼层
Post by junjun_12315;1851417
希望有安转成功的朋友发帖子共享下,只能先谢了。


http://cocobear.info/blog/2008/05/19/fedora9-vmware/
回复 支持 反对

使用道具 举报

发表于 2008-5-19 10:20:08 | 显示全部楼层
呵,我已经转投Sun xVM VirtualBox 怀抱了,很快的说,不知道是不是用cpu来换取执行时间的。
不过,确实是快多了,安装文件也小多了
回复 支持 反对

使用道具 举报

发表于 2008-5-21 13:51:23 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表