鍍金池/ 問答/Linux  網(wǎng)絡安全/ 虛擬機ubuntu 18.04 安裝VMwareTools沒生效?

虛擬機ubuntu 18.04 安裝VMwareTools沒生效?

就是按照一般步驟,結果不生效:

1.直接把WMwareTools拷貝出來到桌面吧

2.然后打開終端解壓 命令:tar -xzvf VMwareTools-10.0.6-3595377.tar.gz

3.進入解壓后的目錄,執(zhí)行:sudo ./wmware-install.pl 然后就一直回車了。

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

是因為vmwaretools不支持最新的ubuntu18.04嗎?

回答
編輯回答
毀了心

在安裝vmware-tools時,出現(xiàn)

“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;

安裝完成,解決

2017年8月7日 21:50