虚拟机ubuntu 18.04 安装VMwareTools没生效?

就是按照一般步骤,结果不生效:

1.直接把WMwareTools拷贝出来到桌面吧

2.然后打开终端解压 命令:tar -xzvf VMwareTools-10.0.6-3595377.tar.gz

3.进入解压后的目录,执行:sudo ./wmware-install.pl 然后就一直回车了。

4.到最后提示成功,reboot就可以了。

是因为vmwaretools不支持最新的ubuntu18.04吗?

阅读 6.2k
1 个回答

在安装vmware-tools时,出现

“The path "" is not valid path to the gcc binary”

确认安装gcc, 输入路径之后/usr/bin/gcc

“The path "/usr/bin/gcc" is not valid path to the gcc binary”

然后直接干脆直接no,
结果不生效。

查找原因,找到vmware-tools-distrib/bin/vmware-config-tools.pl 文件:
找到:

sub getValidGccPath {
  my $gcc_path = shift;
  my $modconfig = shift;
  my $appLoaderArgs = shift;
  my $answer;
  my $query;
  my $default;

  while (1) {
    if (system("$modconfig --validate-gcc \"$gcc_path\" $appLoaderArgs " .
           ">/dev/null 2>&1") == 0) {
      $query = "The path \"$gcc_path\" appears to be a valid path to the " .
           "gcc binary.";
      $default = 'no';
    } else {
      $query = "The path \"$gcc_path\" is not valid path to the gcc binary.";
      $default = 'yes';
      $gcc_path = '';
    }

    $answer = get_answer($query . "\n Would you like to change it?",
             'yesno', $default);
    if ($answer eq 'yes') {
      # Get new path.
      $gcc_path = query('What is the location of the gcc program ' .
            'on your machine?', $gcc_path, 0);
    } else {
      last;
    }
  }
  return $gcc_path;
}

加入输入路径,直接返回gcc_path的值

  $gcc_path = query('What is the location of the gcc program ' .
            'on your machine?', $gcc_path, 0);
  return $gcc_path;

安装完成,解决

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题