gcloud command not found - while installing Google

2019-01-30 21:29发布

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.google.com | bash

as seen at https://cloud.google.com/sdk/

It got all the way to the end and finished but even after I restarted my shell, the gcloud command still says it's not found.

Why isn't this installation working?

20条回答
Rolldiameter
2楼-- · 2019-01-30 22:09

If you are running ZSH shell in MacOS you should rerun the installation and when you be asked for this question:

Modify profile to update your $PATH and enable shell command 
completion?

answer YES

and

Enter a path to an rc file to update, or leave blank to use 
    [/Users/your_user/.bash_profile]:

answer(your zshrc path): /Users/your_user/.zshrc

Restart Terminal and that's all.

查看更多
成全新的幸福
3楼-- · 2019-01-30 22:12

Same here, I try

source ~/.bashrc

Then, It worked

查看更多
登录 后发表回答