gcloud sdk on Mac Sierra

282 views
Skip to first unread message

gdenn

unread,
Feb 10, 2017, 10:02:10 AM2/10/17
to Google App Engine
Hi,

i recently changed to macOs and i am currently running their newest Version "macOS Sierra Version 10.12".
Problems started after i installed gcloud cli tools from the official page https://cloud.google.com/sdk/docs/quickstart-mac-os-x
I tried both (Darwin_x_86 and Darwin_x_86_64) but after installation there is no env variable set for gcloud. So i look into the ~/.bash_profile and what i see is https://gist.github.com/Rapdrei/4a97512039cdc2c835e42e6e4dc453d3

After that i call .bash_profile manually by source ~/.bash_profile and receive the error https://gist.github.com/Rapdrei/7fb2277309941d3621a9ac99b19b092b .

Could someone reproduce the problem or even solve it?
best,
gdenn

Nick (Cloud Platform Support)

unread,
Feb 10, 2017, 11:22:10 AM2/10/17
to Google App Engine
Hey gdenn,

Sourcing .bash_profile is the right thing to do, as it's there that the path is augmented to add gcloud and its completions. You should check if another file, like ~/.bashrc is being sourced, and if necessary, add "source ~/.bash_profile" in there, to ensure it is sourced every time and doesn't need to be run as a command by hand in future.

I found a link online to a github issue where a user saw similar issues (I found it by googling the error message, a common and very useful means to debug issues!) on Mac OS X. Check the thread for advice on possible solutions, such as installing bash_completion. Be aware that this isn't a link to Google documentation so you assume responsibility for it, and I'm far from guaranteeing it as a solution. But it's one possible avenue to look into.

Another issue the link raises is whether or not you're even running a bash shell. Zsh has a different syntax and you may need to figure out how to augment your path and set up completion. There's a gist on github purporting to show this, but note that this is also not one of our links and I can't vouch for it - you'll have to study it yourself for security, applicability, etc.

Let me know if you have any further questions, and how all this works out for you; I'll be happy to help!

Nick
Cloud Platform Community Support
Reply all
Reply to author
Forward
0 new messages