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
I had this issue today, and adding sudo
to the install command
fixed my issue on maxOS Sierra!
sudo ./google-cloud-sdk/install.sh
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!
When installing the SDK I used this method:
curl https://sdk.cloud.google.com | bash
When using this method from the original author make sure you have accepted the security preferences in your mac settings to allow apps downloaded from app store and identified developers.
If running
source ~/.bashrc
results in "No such file or directory"
On windows:
source <pasteCopiedPathHere>
-> for example: source "C:\Users\John\.bashhrc"
How to install GCloud and Always Works after Restart On Mac OS HIGH Sierra:
Download install package Here
Achieved file and drop in your folder
Open terminal, go to your folder with file and enter this command:
./google-cloud-sdk/install.sh
"Modify profile to update your $PATH
and enable bash completion?"
Yes
/Users/USERNAME_COMPUTER/.bashrc
After all install, enter this:
source ~/.bashrc
Enter this to check install gcloud:
gcloud - -version
Open new window terminal cmd+n
DONT CLOSE OLD WINDOW and enter in new window gcloud version
if: «command not found» go to step 9
else: Congratulations GCloud work in terminal
Return to old window and enter echo $PATH
and copy path to GCloud
Open BASH_PROFILE:
open ~/.bash_profile
Enter path to new Bash:
« export PATH="/Users/USERNAME_COMPUTER/google-cloud-sdk/bin:$PATH" »
Return to step 8
You just have to execute this command as root
$ curl https://sdk.cloud.google.com | bash
Restart the terminal and that's it. Now all commands should be executed as root