1

I have google cloud sdk installed on my ubuntu 14.4system but whenever I type gcloud init in my console, I get the following error:-

rbenv: gcloud: command not found

Further if I run gcloud init with sudo the error changes to:-

/usr/bin/env: ruby1.9.1: No such file or directory

I am unable to understand what has google cloud sdk to do with rbenv. I tried reinstalling google cloud sdk but with the same result. Is there a way out? any help is greatly appreciated.

cherba
  • 8,681
  • 3
  • 27
  • 34
Rndomcoder
  • 158
  • 2
  • 18

2 Answers2

1

On linux when you install the SDK it prompts to put following into your ~/.bashrc so PATH and such are setup to make cmds like gcloud visible

# The next line updates PATH for the Google Cloud SDK.
source '/home/scott/google-cloud-sdk/path.bash.inc'

# The next line enables shell command completion for gcloud.
source '/home/scott/google-cloud-sdk/completion.bash.inc'

If you are not on linux/OSX then the SDK install will have similar

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
0

It sounds as though gcloud is not on your $PATH.

If you installed the Cloud SDK to /home/username/google-cloud-sdk/, you should be able to invoke gcloud by running /home/username/google-cloud-sdk/bin/gcloud info. If you would like to be able to run simply gcloud, you can run export PATH="/home/username/google-cloud-sdk/bin:$PATH" (to make this setting persist, put that command in your ~/.profile file.

Zachary Newman
  • 20,014
  • 4
  • 39
  • 37