I'm trying to install the Google Cloud SDK on a Mac (following https://cloud.google.com/sdk/docs/quickstart-mac-os-x), using the install.sh
script:
~/Downloads$ ./google-cloud-sdk/install.sh
In the logged output, I see the following instructions:
==> Source [/Users/kurtpeek/Downloads/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud.
==> Source [/Users/kurtpeek/Downloads/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.
Indeed, I find that using the gsutil
command still leads to a -bash: gsutil: command not found
error, so I still probably have to perform this step.
It is not entirely clear to me, however, what is meant by these instructions. I'm on a Mac and my bash profile is ~/.bash_profile
. What lines would I have to add in order to make the command line completion work?
Update
The first time I installed I did not use sudo
. Reinstalling with sudo
, I get an additional prompt whether to modify my bash profile, which upon accepting leads to the following lines added to my .bash_profile
:
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/kurtpeek/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/kurtpeek/Downloads/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/kurtpeek/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/kurtpeek/Downloads/google-cloud-sdk/completion.bash.inc'; fi
However, I still get gsutil: command not found
errors.
For Mac Run below command to run the install.sh
:
sudo chmod +x install.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With