I am trying to install the Google Cloud SDK on Mac using the following command in terminal
curl https://sdk.cloud.google.com | bash
It worked fine but when I move to the next step of
gcloud init
I get the following
-bash: gcloud: command not found
I have tried all solutions to the same question as in here, however I still get the same error message. The installer didn't prompt me with the following message either: Modify profile to update your $PATH and enable bash completion? (Y/n)?
The root cause of this is the Cloud SDK not being added to your path. If you followed the multitude of other answers about this issue and still have the same problem, it means you missed a step.
You can edit
/Users/<yourname>/.profile
and either include the following lines:Or you can manually set your PATH variable: