Unable to run gcutil from command line

送分小仙女□ 提交于 2019-12-11 07:25:26

问题


When I try to install gcutil by following steps on https://developers.google.com/compute/docs/gcutil/

here is the bin dir contents of C:\gcutil\google-cloud-sdk\bin :

but gcutil does not seem to install correctly. When I attempt to run gcutil I receive the error :

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

Should gcutil not be a .bat file command ? How can I invoke gcutil ?


回答1:


You do not need to install cygwin unless you need the ssh functionality of gcutil.

The reason you could not initially run gcutil is because it was a python script (and you were not prefixing the command with 'python'). We have since changed this to be a .cmd script, so it should work more natively in windows. If you add the bin directory to your PATH, you should be able to run gcutil from anywhere.




回答2:


  • Download and install Cygwin. Install the 32-bit version.
  • Start Cygwin. and download the SDK

    $ curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash

  • Restart Cygwin (or cmd).

  • Authenticate.

    $ gcloud auth login

  • Reset PATH from console.

    setx PATH "%PATH%;C:\full\path\to\google-cloud-sdk\bin"

Or you can use environment variables.

About variables




回答3:


Installing cygwin to run gcutil if you are working with windows.

https://developers.google.com/compute/docs/gcutil/ (check the windows tab)

I just do it and work fine.



来源:https://stackoverflow.com/questions/20519150/unable-to-run-gcutil-from-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!