-bash: gcloud: command not found on Mac -


i'm following quickstart mac os x install cloud sdk. following steps exactly,

1) python -v returns "python 2.7.10"

2) download , extract using ./install.sh 64bit version of sdk in google-cloud-sdk returns...

welcome google cloud sdk!  improve quality of product, collect anonymized usage data , anonymized stacktraces when crashes encountered; additional information available @ <https://cloud.google.com/sdk/usage-statistics>. may choose opt out of collection (by choosing 'n' @ below prompt), or @ time in future running following command:      gcloud config set disable_usage_reporting true  want improve google cloud sdk (y/n)?  y   current cloud sdk version is: 170.0.1 latest available version is: 170.0.1  ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │                                                  components                                                 │ ├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤ │     status    │                         name                         │            id            │    size   │ ├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤ │ not installed │ app engine go extensions                             │ app-engine-go            │  97.7 mib │ │ not installed │ cloud bigtable command line tool                     │ cbt                      │   4.0 mib │ │ not installed │ cloud bigtable emulator                              │ bigtable                 │   3.5 mib │ │ not installed │ cloud datalab command line tool                      │ datalab                  │   < 1 mib │ │ not installed │ cloud datastore emulator                             │ cloud-datastore-emulator │  15.4 mib │ │ not installed │ cloud datastore emulator (legacy)                    │ gcd-emulator             │  38.1 mib │ │ not installed │ cloud pub/sub emulator                               │ pubsub-emulator          │  33.2 mib │ │ not installed │ emulator reverse proxy                               │ emulator-reverse-proxy   │  14.5 mib │ │ not installed │ google container local builder                       │ container-builder-local  │   3.7 mib │ │ not installed │ google container registry's docker credential helper │ docker-credential-gcr    │   2.2 mib │ │ not installed │ gcloud alpha commands                                │ alpha                    │   < 1 mib │ │ not installed │ gcloud beta commands                                 │ beta                     │   < 1 mib │ │ not installed │ gcloud app java extensions                           │ app-engine-java          │ 128.1 mib │ │ not installed │ gcloud app php extensions (mac os x)                 │ app-engine-php-darwin    │  21.9 mib │ │ not installed │ gcloud app python extensions                         │ app-engine-python        │   6.5 mib │ │ not installed │ kubectl                                              │ kubectl                  │  15.9 mib │ │ installed     │ bigquery command line tool                           │ bq                       │   < 1 mib │ │ installed     │ cloud sdk core libraries                             │ core                     │   6.7 mib │ │ installed     │ cloud storage command line tool                      │ gsutil                   │   3.0 mib │ └───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘ install or remove components @ current sdk version [170.0.1], run:   $ gcloud components install component_id   $ gcloud components remove component_id  update sdk installation latest version [170.0.1], run:   $ gcloud components update  ==> source [/users/shaneoseasnain/desktop/google-cloud-sdk/completion.bash.inc] in profile enable shell command completion gcloud. ==> source [/users/shaneoseasnain/desktop/google-cloud-sdk/path.bash.inc] in profile add google cloud sdk command line tools $path.  more information on how started, please visit:   https://cloud.google.com/sdk/docs/quickstarts 

3) i've restarted terminal , run gcloud init inside google-cloud-sdk. returns "command not found." if run ls, see following directory structure:

license               completion.zsh.inc      path.fish.inc readme                deb                     path.zsh.inc release_notes         install.bat             platform version               install.sh              properties bin                   lib                     rpm completion.bash.inc   path.bash.inc 

4) i've tried run gcloud init inside bin well, same problem, command not found.

the other suggestions can see install guide "enable command-completion in bash shell, and/or enable usage reporting." i'm not sure how command completion , reporting don't should related problem. there lot written command not found relate other problems where, example, gcloud has stopped working after while or problems in older versions. has tip how cloud sdk working?

thanks

the gcloud executable lives in google-cloud-sdk/bin–to run gcloud. you'll need either:

  1. add directory $path. in particular, adding line source /users/shaneoseasnain/desktop/google-cloud-sdk/path.bash.inc .bash_profile file (more detail on file , how pick one) trick.
  2. specify full path gcloud executable when run it. in case, /users/shaneoseasnain/desktop/google-cloud-sdk/bin/gcloud. example:

    $ /users/shaneoseasnain/desktop/google-cloud-sdk/bin/gcloud init 

the pertinent part of quickstart (emphasis added):

run install script add cloud sdk tools path, enable command-completion in bash shell, and/or enable usage reporting:

as why install script didn't work, can't say. please file issue , we'll investigate.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -