Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google compute engine 无法从命令行运行gcutil_Google Compute Engine_Gcutil_Gcloud - Fatal编程技术网

Google compute engine 无法从命令行运行gcutil

Google compute engine 无法从命令行运行gcutil,google-compute-engine,gcutil,gcloud,Google Compute Engine,Gcutil,Gcloud,当我尝试按照上的步骤安装gcutil时 以下是C:\gcutil\google cloud sdk\bin的bin目录内容: 但gcutil似乎安装不正确。当我尝试运行gcutil时,我收到错误: C:\gcutil\google-cloud-sdk\bin>gcutil 'gcutil' is not recognized as an internal or external command, operable program or batch file. gcutil不应该是.ba

当我尝试按照上的步骤安装gcutil时

以下是C:\gcutil\google cloud sdk\bin的bin目录内容:

但gcutil似乎安装不正确。当我尝试运行gcutil时,我收到错误:

C:\gcutil\google-cloud-sdk\bin>gcutil
'gcutil' is not recognized as an internal or external command,
operable program or batch file.

gcutil不应该是.bat文件命令吗?如何调用gcutil?

如果使用windows,请安装cygwin以运行gcutil

(检查windows选项卡)

我只是做了,而且做得很好。

  • 下载并安装Cygwin。安装32位版本。
  • 启动Cygwin。并下载SDK

    $curl | bash

  • 重新启动Cygwin(或cmd)

  • 验证

    $gcloud auth登录

  • 从控制台重置路径

    setx路径“%PATH%;C:\full\PATH\to\google cloud sdk\bin”

也可以使用环境变量


除非需要gcutil的ssh功能,否则不需要安装cygwin

最初无法运行gcutil的原因是它是一个python脚本(并且您没有在命令前面加上“python”)。我们已经把它改成了一个.cmd脚本,所以它应该在windows中更自然地工作。如果将bin目录添加到路径中,则应该能够从任何位置运行gcutil