InstallingVMware

出自Ubuntu中文

目录

安装 VMWare

原文出处:

原文作者:

授权许可:

翻译人员:JimHu

校正人员:

贡献人员:

适用版本: 文章状态:等待翻译



Here's some help for those of you trying to install VMware and getting errors about kernel headers, gcc version, or not being able to execute cc1plus.

这里提供了一些您在尝试安装VMWare过程中,遇到内核头文件,gcc版本错误,或者无法执行cc1plus时的帮助。

FIXME This should be consolidated with InstallingVMWare (which see)

Preparation 准备工作

  • First make sure you have the build essential package installed:首先确定您已经安装了build essential软件包:
sudo apt-get install build-essential
  • Make sure the internet super-server is installed. You can install the newer inetd replacement:确定因特网超级服务器已经安装。您也可一安装更新的inetd代替:
sudo apt-get install xinetd
    • or the old inetd server:或者旧版的inetd服务器:
sudo apt-get install inetutils-inetd
  • Make sure you have your kernel headers installed:确定您已经安装了您使用内核头文件:
sudo apt-get install linux-headers-`uname -r`
    • Note that those are backticks (`) above, not single quotes. 注意上面的是单引号('),不是双引号。
  • You will need to install the gcc version that compiled your kernel. This tells you what version of gcc your kernel was compiled with:您可能需要安装编译您内核时使用的那个版本的gcc。 这样做能告诉你哪个版本的gcc是适合你的内核版本的。
cat /proc/version
    • Which returns something like this: 可能返回类似的如下文的内容:
Linux version 2.6.12-10-686-smp (buildd@terranova) (gcc version 3.4.5 20050809 (prerelease) (Ubuntu 3.4.4-6ubuntu8)) #1 SMP Fri Nov 18 12:27:41 UTC 2005
    • Look at the part gcc version 3.4.5. This means we need to install gcc-3.4:看"gcc version 3.4.5”,这意味着我们需要安装gcc-3.4
sudo apt-get install gcc-3.4
  • We will temporarily (until we log out) change our default compiler to the version VMware is looking for. To do this: 我们将临时更改我们的默认编写器为VMware需要的版本
export CC=/usr/bin/gcc-3.4
  • What people are forgetting, and screwed me up, was the g++ version. Some people seemed to be able to go right to the vmware-config.pl after the gcc install, but mine died when it got to compiling the vmmon module with the error "cannot exec `cc1plus'". What you need is the gcc-c++ version that matches the gcc version you just installed, only for Debian/Ubuntu it's called g++. 人们忘记,也是我所无法解决的就是g++的版本。有些人可能在安装gcc后能够正常运行vmware-config.pl,不过我的就在编译vmmon模块的时候挂了,给出"cannot exec'cc1plus'"的错误提示。你需要的gcc-c++版本要能和你安装的gcc版本对应,只是在Debian/Ubuntu中,它被叫作g++。
sudo apt-get install g++-3.4
  • Download VMware Workstation as a Compressed Tar Archive from VMware. Don't use the RPM version, this will cause more problems when installing. 从VMware下载VMware Workstation的Tar压缩包。不要下载RPM版本,这样做会在安装的时候产生更多问题。

Installing VMware 5.5 安装VMware 5.5

Unpack and install VMware. The name of your tar archive depends on the version you downloaded. 解压缩并且安装VMware。Tar压缩档的文件名取决于你下载的版本。

tar xvzf VMware-workstation-5.5.1-19175.tar.gz
cd vmware-distrib
sudo ./vmware-install.pl

Installing VMware 5.0 安装VMware 5.0

  • Unpack and install VMware. The name of your tar archive depends on the version you downloaded. 解压缩并安装VMware。Tar压缩档的文件名取决于你下载的版本。
tar xvzf VMware-workstation-5.0.0-13124.tar.gz
cd vmware-distrib
sudo ./vmware-install.pl
    • It should install fine, but DO NOT run the vmware-config.pl just yet. 他应该可以正常安装,不过暂时不要运行vmware-config.pl。
  • For VMware 5.0.0, it's always best to use the vmware-any-any-update script instead of the vmware-config.pl. It's available from here: http://platan.vc.cvut.cz/ftp/pub/vmware/. 对于Vmware 5.0.0而言,最好的方法是使用vmware-any-any-update脚本来代替vmware-config.pl。可以从这里下载http://platan.vc.cvut.cz/ftp/pub/vmware/。
tar xvzf vmware-any-any-update96.tar.gz
cd vmware-any-any-update96
sudo ./runme.pl

That should do it. I'm pretty sure I put everything in here. This should be a concise instruction on how to get VMware going on Breezy after you upgraded everything. I couldn't find any threads adressing all 3 of these errors, and nobody else seemed to have an answer to the cc1plus error. Hope this helps!这样做应该就可以了。我很确定我已经把所有的都说清楚了。这应该就是一份在升级完所有东西的Breezy安装VMware的简明指南。 对于这3个问题我没有找到任何解决思路,似乎没有人能对cc1pule错误给出答案。希望这些能帮助你。

Installing VMWare Server 安装 Vmware Server

Open the command line and point it to the directory that the tar.gz file is located, using the "cd" (change directory) command. Note that the directory below is an example and you can have the file located anywhere. 打开终端并且切换到你存放tar.gz文件的目录,你可以使用"cd"命令。注意,下面出现的目录只是一个例子,你可能把它放在任何地方。

cd '/home/UserName/Desktop/VMwareServerDirectory'

then uncompress the file. Make sure to replace the name of the tar.gz file in the example to what it is actually named on your computer. 接着把文件解压缩。确保你用正确的存放在你电脑上的文件名代替下面例子中的文件名。

tar xvzf VMware-server-1.0.1-29996.tar.gz

then "cd" to the newly created directory: 然后用"cd"命令切换到新创建的路径。

cd '/home/UserName/Desktop/VMwareServerDirectory/vmware-server-distrib'

...and start the installer program: ...然后开始运行安装程序:

sudo ./vmware-install.pl

Installing VMWare Player 安装 Vmware Player

Run the installer 运行安装程序

sudo perl vmware-install.pl

You can take all the defaults until it gets to the section on compiling vmmon.你可以一路保持默认设置,直到编译vmmon这一步。

What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.12-10-686-smp/include

Running VMware 运行VMware

/usr/bin/vmware

Troubleshooting 疑难解答

  • The VMWare "Snapshot Manager" may still crash when clicked on. To work around this problem, set an environment variable in the shell before running VMware. I have these two commands together in a shell script for launching the program:当单击Vmware "Snapshot Manager"的时候,程序崩溃。为了解决这个问题,先为外壳设置一个可变环境,然后再运行VMware。在终端中输入如下两个命令来启动程序。
export VMWARE_USE_SHIPPED_GTK=yes
vmware
  • If you have a Pentium-M "Centrino" notebook, you may notice VMware runs very slowly at times. To fix this problem, do as follows in a shell script:如果你有一台Pentium-M "Centrino"的笔记本电脑,你可能发现VMware有时运行非常缓慢。为了解决这个问题,在终端中输入如下命令:
#!/bin/sh
# Script to launch VMware under Breezy:
OLD_CSTATE="`cat /sys/module/processor/parameters/max_cstate`"
echo "1" > /sys/module/processor/parameters/max_cstate
export VMWARE_USE_SHIPPED_GTK=yes
vmware
echo $OLD_CSTATE > /sys/module/processor/parameters/max_cstate
  • A heads up for people coming from hoary to breezy with a VMWare install. I was trying to reconfigure my vmware install for use in breezy (regenerate kernel modules, etc) using vmware-config.pl; however, doing so would not only fail to make VMWare work, but it would leave my system relatively unusable (specifically, sudo no longer worked!). The solution was to download the distribution tarball again, and reinstall (as per the instructions here). Simply reconfiguring the old install doesn't seem to work. 从Hoary升级到Breezy的人在安装VMware的时候需要注意一下。当我尝试着去用vmware-config.pl来重新配置我的vmware以供breezy使用(重新编译内核,等等),但是这样做不只使vmware不能正常工作,还是我的系统相对的不能使用(尤其是sudo不再起作用!)。解决的方法是再次去下载源代码包(distribution tarball),并且重新安装。(就像这里的每一步指导)。简单的重新配置就安装似乎不起作用。
  • Some people may have a problem starting bridged networking (vmnet0). vmnet0 is bridged to eth0, so try running ifdown eth0 first, THEN running the vmware-config.pl or runme.pl. 有些人可能在启用bridged networking(vmnet0)遇到问题。vmnet0桥接到eth0,所以先试试看运行ifdown eth0。然后再运行vmware-config.pl或者runme.pl
  • VMware 5.5 doesn't need the 'vmware-any-any-update' package. If you did try this, you will get the following sorts of errors: VMware 5.5部需要"vmware-any-any-update"包。如果你确实是尝试过这个东西,你可能得到下面类型的错误:
Version mismatch with vmmon module: expecting 137.0, got 116.0. Try reinstalling VMware Workstation.
    • To fix this problem, run the version of vmware-config.pl included in the VMware package. If have already run the version in the vmware-any-any-update package, rerun the vmware-install.pl script to reinstall VMware. 要修正这个错误,运行在VMware package中的vmware-config.pl。如果你已经运行了vmware-any-any-update中的,重新运行vmware-install.pl脚本来重新安装VMware
  • You get an error about missing library files (file extension .so). This will happen if you don't have the X Window system installed. You can either install the libraries one by one or install x-window-system-core, which is simpler, but will also install other unnecessary packages: 丢失库文件(文件extension.so)的错误提示。这个会在你没有安装X Window系统的时候发生。你可以一个一个安装库或者更简单的安装x-windows-system-core,不过这也将会安装其他不必要的包。
sudo apt-get install x-window-system-core

Reconfiguring VMWare after kernel upgrade 在升级内核后重新配置VMware

After upgrading to a newer kernel version, you may find VMWare stops working and displays the error (note: if you're not running it from a terminal the program will just exit with no grapical error messages): 在升级到新的内核后,你可能会发现VMware不能正常工作并且提示错误(注意:如果你不是在终端中运行的,那么程序将在退出全部会返回任何错误信息):

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.

This happens even on a minor kernel update (e.g 2.6.12-9 to 2.6.12-10), but is simple to rectify using the steps above. Before running "/usr/bin/vmware-config.pl" as suggested you will need to get the correct kernel headers for your new kernel, and make sure you point the correct version of gcc to the config script. 这甚至会在一次很小的内核升级是发生(例如2.6.12-9到2.6.12-10),不过可以很简单的用上面的步骤来修正。在运行"/usr/bin/vmware-config.pl“泥浆必须得到正确的新内核的内核头,并且确保你正在使用正确版本的gcc来配置脚本。

All this is explained above, so I wont go through it here. Once you've done that run the conifg script, select the defaults for all the options except: 这些都在上面解释过了,所以我不会在这里再做一遍。一旦你已经运行了配置脚本,选择默认设置除了:

Would you like to skip networking setup and keep your old settings as they are?
(yes/no) [no]

Select yes, as you're network setting should not have changed. 选择是(yes),因为你的网络设置应该没有被改变。

Once the config file has finished you should be able to run VMWare again with no problems. 一旦配置文件完成了,你应该可以再一次没有问题的运行VMware。



支持所有版本类