【问题标题】:installing vmware tools: location of GCC binary? [closed]安装 vmware 工具:GCC 二进制文件的位置? [关闭]
【发布时间】:2013-09-19 05:36:25
【问题描述】:

好的,所以我尝试使用以下说明从命令行使用 tar 安装程序安装 VMware 工具: http://www.vmware.com/support/ws5/doc/ws_newguest_tools_linux.html#wp1118025

我正在 lubuntu 上安装 vmware 工具,我使用 vmplayer 作为虚拟机运行。 在第5步之后,在回答屏幕上的配置问题时,它说

the installatinon of vmware tools 9.2.3 build-1031360 for linux completed sucessfully.  you can devide to 
remove this software form your system at any time by invoking the following command:
"/usr/bin/vmware-uninstall-tools.pl".
before running vmware tools for the first time, you need to configure it by invoking  the following command:
"usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for  you now?
[yes]

我按下回车键并接受了默认的 [yes] 值,现在它显示

Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel

Searching for GCC...
the path "" is not valid path to the gcc binary. 
Would you like to change it? [yes]

What is the location of the gcc program on your machine?

我做到了

locate gcc

并发现有一个名为 /usr/lib/gcc 的文件夹,所以我尝试将其作为位置,但它说路径“/usr/lib/gcc”不是 gcc 库的有效路径. 如何找出我机器上 gcc 二进制文件的位置?

【问题讨论】:

    标签: gcc virtual-machine vmware


    【解决方案1】:

    sudo apt-get install build-essential 足以让它工作。

    【讨论】:

    • 别忘了先运行sudo apt-get update
    • 为我工作。但我不得不编辑我的 /etc/apt/sources.list。我的 vanilla install Debian 8 一直要求我插入 Jesse 安装 CD-ROM,但在注释掉这行 apt 后,终于在网上找到了包,
    • 对我不起作用,即使我指向 gcc 目录 /usr/bin/gcc
    • 尤其是在 Ubuntu 18.04 下,这还不够。您还需要安装 gcc-8:sudo apt install gcc-8
    【解决方案2】:

    安装必备 VMware Tools for LinuxOS:

    如果你有 RHEL/CentOS:

    yum install perl gcc make kernel-headers kernel-devel -y
    

    如果你有 Ubuntu/Debian:

    sudo apt-get -y install linux-headers-server build-essential
    
    • build-essential,同时安装:dpkg-dev、g++、gcc、lib6-dev、libc-dev、make

    摘自:http://www.sysadmit.com/2016/01/vmware-tools-linux-instalar-requisitos.html

    【讨论】:

      【解决方案3】:

      输入:/usr/bin/gcc 为我工作。

      【讨论】:

        【解决方案4】:

        找到了答案。我所做的是首先

        sudo apt-get install aptitude
        sudo aptitude install libglib2.0-0
        sudo aptitude install gcc-4.7 make linux-headers-`uname -r` -y
        

        试过了,但没用,所以我继续做了

        sudo apt-get install build-essential
        sudo apt-get install gcc-4.7 linux-headers-`uname -r`
        

        做了这两个步骤后,再试一次,就成功了。

        【讨论】:

        • 我正在尝试使用此解决方案来解决我面临的相同问题。我在虚拟机中安装了 Debian,它要求我将“官方 amd64 二进制文件”放入 CDROM,然后按 enter
        • @EternallyCurious 看看 dao2 答案是否适用于 CDROM 问题。
        【解决方案5】:

        要避免 CDROM 的问题: sudo nano /etc/apt/sources.list

        找到你的光盘并用#注释它

        保存更改:“cntrl + o”,然后退出文件:“cntrl + x”

        然后尝试重新安装

        【讨论】:

          【解决方案6】:

          首先执行这个

          sudo apt-get install gcc binutils make linux-source
          

          然后再次运行

          /usr/bin/vmware-config-tools.pl
          

          这就是你需要做的。现在你的系统有了 gcc make 和 linux 内核源代码。

          【讨论】:

          • 请用更好的英文解释,并尽量使用正确的格式。在右上角,有帮助部分教你这些。
          猜你喜欢
          • 2014-03-29
          • 2012-05-31
          • 1970-01-01
          • 2015-03-26
          • 2013-06-17
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多