让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
来源:互联网 发布:c语言中关键字是什么 编辑:程序博客网 时间:2024/06/05 15:18
今天查看Linux Kernel modules,忽然发现/lib/modules下面有一个旧内核的目录,好奇之下进去看看,结果有了新发现,里面还有一些残存的配置,从名称看来应该是VMWare相关的,难不成是当初安装的时候,安装程序放的一些共享库在kernel modules目录中的?看看新内核的module目录,什么都没有:
[xport@ubuntu misc] $ pwd
/lib/modules/2.6.17-11-generic/misc
[xport@ubuntu misc] $ ls -l
总用量 1380
lrwxrwxrwx 1 root root 43 2007-04-21 01:33 vmmon.ko -> /lib/modules/2.6.17-11-generic/misc/vmmon.o
-rw-r--r-- 1 root root 487101 2007-04-21 01:33 vmmon.o
lrwxrwxrwx 1 root root 43 2007-04-21 01:34 vmnet.ko -> /lib/modules/2.6.17-11-generic/misc/vmnet.o
-rw-r--r-- 1 root root 913781 2007-04-21 01:34 vmnet.o
念及*NIX的好处,直接mv过去好了,应该可以直接用吧?!
[xport@ubuntu ~] $ sudo cp /lib/modules/2.6.17-11-generic/misc/*.o /lib/modules/2.6.20-15-generic/misc/
[xport@ubuntu ~] $ cd /lib/modules/2.6.17-11-generic/misc
[xport@ubuntu misc] $ sudo ln -s vmmon.o vmmon.ko
[xport@ubuntu misc] $ sudo ln -s vmnet.o vmnet.ko
但是这样运行vmware的网络服务却不成功,提示说:
[xport@ubuntu ~] $ sudo /etc/init.d/vmware start
vmware is installed, but it has not been (correctly) configured
for this system. To (re-)configure it, invoke the following command:
/usr/bin/vmware-config.pl.
运行vmware-config.pl又出来这个错误提示:
[xport@ubuntu ~] $ sudo /usr/bin/vmware-config.pl
...
... 省略 ...
...
None of the pre-built vmmon modules for VMware Server 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.20-15-generic/build/include]
Extracting the sources of the vmmon module.
Building the vmmon module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:80:
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/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.
原来是build modules的时候出现了错误!
要解决此问题,需要修改VMWare的module source,所有的source都是一个tar文件:
[xport@ubuntu ~] $ ls -l /usr/lib/vmware/modules/source/
总用量 1824
-r--r--r-- 1 root root 706560 2007-04-21 01:33 vmmon.tar <--- 我们需要修改这个tar文件中的 compat_kernel.h
-r--r--r-- 1 root root 378880 2007-02-17 16:37 vmnet.tar
-r--r--r-- 1 root root 51200 2007-02-17 16:37 vmppuser.tar
修改内容如下,即把第21行的代码给注释掉后,把此文件再写回原来的vmmon.tar档案中:
/*
* static inline _syscall1(int, compat_exit, int, exit_code);
*/
这个做完以后,就可以再次运行vmware-config.pl去编译生成kernel modules了!
*** 补遗 ***
后来在论坛闲逛的时候,看到了更好的解决办法,我的手法有些暴力+粗糙了!
修改如下(原来是VMWare与2.6.19之后的内核有不兼容的地方):
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
static inline _syscall1(int, compat_exit, int, exit_code);
#endif
- 让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
- 让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
- 让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
- 让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
- Install VMware-workstation 6.0 under Ubuntu 7.04 Feisty Fawn
- Ubuntu Feisty Fawn(7.04)中scim的问题解决
- Ubuntu 7.04 (Feisty Fawn) DVD 下载地址
- Ubuntu 7.04 (Feisty Fawn) 安装(硬盘安装)与配置图文指南
- Ubuntu 7.04 (Feisty Fawn) 开始免费邮寄光盘
- 如何让dojo1.8在IE9中正常运行?
- 让DEDECMS在PHP5.4环境中正常运行
- 一行代码让你基于IE6/7开发的网页能够在IE8中正常使用
- 加速你的 Ubuntu Feisty Fawn
- 在Ubuntu Feisty Fawn安装最新的nVIDIA驱动程序和Beryl
- Ubuntu Linux 7.04 Feisty Fawn安装配置全记录(w/ Beryl/Aiglx桌面效果
- 如何让32位编译的程序在64位系统中正常运行
- 如何让外置硬盘在苹果系统中正常读写
- ubuntu 下在 matplotlib 中正常显示中文的解决办法
- ComponentArt.web.ui中文帮助之Grid(六)
- MysqlSQL00
- Designing Fast-Action Games
- Mysql01
- Mysql02
- 让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
- Rocky-4 Transcript
- 常用的几种交互表存储过程的实现方法
- 将控件的内容输出到Excel
- [ 转帖]嵌入式Linux系统的设计与应用
- js 弹出窗口传回值
- linux设备驱动第三版的使用问题
- DataFormatString格式化列信息
- Mysql 备注字段