I am LAZY bones? AN ancient AND boring SITE

2007年 04月 22日 的归档

ubuntu升级到7.04以后,vmware不能重新配置的解决办法:

vmware原先是在6.10下安装的,6.10下运行没问题。系统升级后,重新配置,出现如下错误:

代码:
#
lly@lly:~$ sudo vmware-config.pl
#
Making sure services for VMware Workstation are stopped.
#

#
Stopping VMware services:
#
Virtual machine monitor done
#
Bridged networking on /dev/vmnet0 done
#
DHCP server on /dev/vmnet1 done
#
Host-only networking on /dev/vmnet1 done
#
DHCP server on /dev/vmnet8 done
#
NAT service on /dev/vmnet8 done
#
Host-only networking on /dev/vmnet8 done
#
Virtual ethernet done
#

#
Configuring fallback GTK+ 2.4 libraries.
#

#
In which directory do you want to install the mime type 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]
#
#
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
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.20-15-generic/build/include] /usr/src/linux-headers-2.6.20-15-generic/include
#
#
Extracting the sources of the vmmon module.
#
#
Building the vmmon module.
#
#
Using 2.6.x kernel build system.
#
make: Entering directory `/tmp/vmware-config1/vmmon-only’
#
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
#
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
#
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
#
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘compat_exit’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘exit_code’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 警告: 在 ‘_syscall1’ 的声明中,类型默认为 ‘int’
#
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] 错误 1
#
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] 错误 2
#
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
#
make: *** [vmmon.ko] 错误 2
#
make: Leaving directory `/tmp/vmware-config1/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.

上irc问了DkYu兄(在此表示感谢),得到如下解决办法:

代码:
#
cd /usr/lib/vmware/modules/source
#
sudo cp vmmon.tar vmmon.tar.old
#
sudo tar xvf vmmon.tar
#
sudo gedit vmmon-only/include/compat_kernel.h
#
找到
static inline _syscall1(int, compat_exit, int, exit_code); 并
#
替换成
#
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#
static inline _syscall1(int, compat_exit, int, exit_code);
#
#endif
#
sudo tar cvf vmmon.tar vmmon-only
#
sudo rm -rf vmmon-only

意思是内核是2.6.20的话,就不需要这个东西拉,这样改了之后,再进行配置,结果还是报错,如下:

代码:
1.
lly@lly:~$ sudo vmware-config.pl
2.
Making sure services for VMware Workstation are stopped.
3.

4.
Stopping VMware services:
5.
Virtual machine monitor done
6.
Bridged networking on /dev/vmnet0 done
7.
DHCP server on /dev/vmnet1 done
8.
Host-only networking on /dev/vmnet1 done
9.
DHCP server on /dev/vmnet8 done
10.
NAT service on /dev/vmnet8 done
11.
Host-only networking on /dev/vmnet8 done
12.
Virtual ethernet done
13.

14.
Configuring fallback GTK+ 2.4 libraries.
15.

16.
In which directory do you want to install the mime type icons?
17.
[/usr/share/icons]
18.

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

22.
In which directory do you want to install the application’s icon?
23.
[/usr/share/pixmaps]
24.
25.
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
26.
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
27.
Trying to find a suitable vmmon module for your running kernel.
28.
29.
None of the pre-built vmmon modules for VMware Workstation is suitable for your
30.
running kernel. Do you want this program to try to build the vmmon module for
31.
your system (you need to have a C compiler installed on your system)? [yes]
32.
33.
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
34.
35.
What is the location of the directory of C header files that match your running
36.
kernel? [/usr/src/linux-headers-2.6.20-15-generic/include]
37.
38.
Extracting the sources of the vmmon module.
39.
40.
Building the vmmon module.
41.
42.
Using 2.6.x kernel build system.
43.
make: Entering directory `/tmp/vmware-config2/vmmon-only’
44.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
45.
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
46.
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
47.
CC [M] /tmp/vmware-config2/vmmon-only/linux/hostif.o
48.
CC [M] /tmp/vmware-config2/vmmon-only/common/cpuid.o
49.
CC [M] /tmp/vmware-config2/vmmon-only/common/hash.o
50.
CC [M] /tmp/vmware-config2/vmmon-only/common/memtrack.o
51.
CC [M] /tmp/vmware-config2/vmmon-only/common/phystrack.o
52.
CC [M] /tmp/vmware-config2/vmmon-only/common/task.o
53.
CC [M] /tmp/vmware-config2/vmmon-only/common/vmx86.o
54.
CC [M] /tmp/vmware-config2/vmmon-only/vmcore/moduleloop.o
55.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.o
56.
Building modules, stage 2.
57.
MODPOST 1 modules
58.
CC /tmp/vmware-config2/vmmon-only/vmmon.mod.o
59.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.ko
60.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
61.
cp -f vmmon.ko ./../vmmon.o
62.
make: Leaving directory `/tmp/vmware-config2/vmmon-only’
63.
The module loads perfectly in the running kernel.
64.
65.
This program previously created the file /dev/vmmon, and was about to remove
66.
it. Somebody else apparently did it already.
67.
68.
This program previously created the file /dev/parport0, and was about to remove
69.
it. Somebody else apparently did it already.
70.
71.
This program previously created the file /dev/parport1, and was about to remove
72.
it. Somebody else apparently did it already.
73.
74.
This program previously created the file /dev/parport2, and was about to remove
75.
it. Somebody else apparently did it already.
76.
77.
This program previously created the file /dev/parport3, and was about to remove
78.
it. Somebody else apparently did it already.
79.
80.
This program previously created the file /dev/vmnet0, and was about to remove
81.
it. Somebody else apparently did it already.
82.
83.
This program previously created the file /dev/vmnet1, and was about to remove
84.
it. Somebody else apparently did it already.
85.
86.
This program previously created the file /dev/vmnet8, and was about to remove
87.
it. Somebody else apparently did it already.
88.
89.
You have already setup networking.
90.
91.
Would you like to skip networking setup and keep your old settings as they are?
92.
(yes/no) [yes]
93.
94.
Extracting the sources of the vmnet module.
95.
96.
Building the vmnet module.
97.
98.
Using 2.6.x kernel build system.
99.
make: Entering directory `/tmp/vmware-config2/vmnet-only’
100.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
101.
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
102.
CC [M] /tmp/vmware-config2/vmnet-only/driver.o
103.
CC [M] /tmp/vmware-config2/vmnet-only/hub.o
104.
CC [M] /tmp/vmware-config2/vmnet-only/userif.o
105.
/tmp/vmware-config2/vmnet-only/userif.c: 在函数 ‘VNetCopyDatagramToUser’ 中:
106.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: ‘CHECKSUM_HW’ 未声明 (在此函数内第一次使用)
107.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
108.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: 所在的函数内只报告一次。)
109.
make[2]: *** [/tmp/vmware-config2/vmnet-only/userif.o] 错误 1
110.
make[1]: *** [_module_/tmp/vmware-config2/vmnet-only] 错误 2
111.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
112.
make: *** [vmnet.ko] 错误 2
113.
make: Leaving directory `/tmp/vmware-config2/vmnet-only’
114.
Unable to build the vmnet module.
115.
116.
For more information on how to troubleshoot module-related problems, please
117.
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
118.
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
119.
120.
Execution aborted.

结果自己依葫芦画瓢,把vmnet.tar给解压了,把里面的userif.c和bridge.c里面都CHECKSUM_HW给注释掉了,再进行配置,果然就可以了,哈哈。
我的vmware又正常啦!