让 VMWare Workstation 5.5.3 能够在 Ubuntu 7.04 (Feisty Fawn)中正常运行!
2008-06-08 14:45
351 查看
今天查看Linux Kernel modules,忽然发现/lib/modules下面有一个旧内核的目录,好奇之下进去看看,结果有了新发现,里面还有一些残存的配置,从名称看来应该是VMWare相关的,难不成是当初安装的时候,安装程序放的一些共享库在kernel modules目录中的?看看新内核的module目录,什么都没有:
念及*NIX的好处,直接mv过去好了,应该可以直接用吧?!
但是这样运行vmware的网络服务却不成功,提示说:
运行vmware-config.pl又出来这个错误提示:
原来是build modules的时候出现了错误!
要解决此问题,需要修改VMWare的module source,所有的source都是一个tar文件:
修改内容如下,即把第21行的代码给注释掉后,把此文件再写回原来的vmmon.tar档案中:
这个做完以后,就可以再次运行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
[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 |
[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 |
[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. |
[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. |
要解决此问题,需要修改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 |
/* * static inline _syscall1(int, compat_exit, int, exit_code); */ |
*** 补遗 ***
后来在论坛闲逛的时候,看到了更好的解决办法,我的手法有些暴力+粗糙了!
修改如下(原来是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)中正常运行!
- Ubuntu 7.04 (Feisty Fawn) DVD 下载地址
- ubuntu 7.04 Feisty Fawn 安装手记之二:基本配置
- 为什么j2ee的web研发过程中,有些jsp、html页面中,没有引入某个js(如test.js),却使用了test.js的某个函数,并且系统能够正常运行??
- ubuntu rc.local不能正常运行
- 使用第三方库的apk 在Ubuntu下编译后不能正常运行
- 关于打开Tomcat主页面是空白的问题(能够正常运行)
- MFC 设置静态链接的时候会有问题,动态链接能够正常运行。
- Ubuntu 7.04 (Feisty Fawn) 开始免费邮寄光盘
- Ubuntu 7.04 (Feisty Fawn) 安装(硬盘安装)与配置图文指南
- ubuntu 7.04 Feisty Fawn 安装手记之三:安装显卡驱动
- Ubuntu锦囊之一:如果程序无法正常运行或出错,请试试加个sudo
- 基于linux用C语言编写的局域网通信软件(在ubuntu上正常运行)
- Linux 0.11 在ubuntu-11和gcc-4.6.1下编译调试至正常运行的过程详解
- Ubuntu Feisty Fawn(7.04)中scim的问题解决
- 如果系统能够保证不在0x000000007fffffff以上的地址分配内存,那么应用程序就能够正常运行。把一个高33位都为0的64位地址截断为32位地址,无论如何都不会产生问题。系统可以提供这一保证,
- ubuntu 7.04 Feisty Fawn 安装手记之四:安装配置beryl+xgl
- Linux 0.11 在ubuntu-11和gcc-4.6.1下编译调试至正常运行的过程详解