gcloud command not found - while installing Google Cloud SDK

后端 未结 28 1201
忘掉有多难
忘掉有多难 2020-12-07 13:43

I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal

curl https://sdk.cloud         


        
28条回答
  •  无人及你
    2020-12-07 14:24

    To launch it on MacOs Sierra, after install gcloud I modified my .bash_profile

    Original lines:

    # The next line updates PATH for the Google Cloud SDK.
    if [ -f '/Users/alejandro/google-cloud-sdk/path.bash.inc' ]; then . '/Users/alejandro/google-cloud-sdk/path.bash.inc'; fi
    
    # The next line enables shell command completion for gcloud.
    if [ -f '/Users/alejandro/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/alejandro/google-cloud-sdk/completion.bash.inc'; fi
    

    updated to:

    # The next line updates PATH for the Google Cloud SDK.
    if [ -f '/Users/alejandro/google-cloud-sdk/path.bash.inc' ]; then source '/Users/alejandro/google-cloud-sdk/path.bash.inc'; fi
    
    # The next line enables shell command completion for gcloud.
    if [ -f '/Users/alejandro/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/alejandro/google-cloud-sdk/completion.bash.inc'; fi
    

    Restart the terminal and all become to work as expected!

提交回复
热议问题