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?
You just have to execute this command as root
Restart the terminal and that's it. Now all commands should be executed as root
To launch it on MacOs Sierra, after install gcloud I modified my .bash_profile
Original lines:
updated to:
Restart the terminal and all become to work as expected!
This worked for me :
After saying
Y
toModify profile to update your $PATH and enable bash completion? (Y/n)?
Google initiation is prompting this :
Enter a path to an rc file to update, or leave blank to use
and the default path was :[/Users/MY_USERSAME/.bash_profile]:
but instead of pressingenter
, I wrote :/Users/MY_USERNAME/.bashrc
to change the path.This would overwrite the default location that Google suggest.
Then, I only had to do
source ~/.bashrc
and everything works now!I'm running zsh and found this gist very helpful: https://gist.github.com/dwchiang/10849350
Edit the ~/.zshrc file to include these two lines:
This assumes you installed the package in your main directory from the official docs
I had to source my bash_profile file. To do so,
Now, the gcloud command should work
Post installation instructions are not clear:
I had to actually add the following lines of code in my
.bash_profile
forgcloud
to work: