# Got command not found error when using gcloud

**URL:** <https://discuss.circleci.com/t/got-command-not-found-error-when-using-gcloud/17845>\
**Category:** Bug Reports\
**Tags:** circle-yml\
**Created:** [November 3, 2017, 12:59am UTC](https://discuss.circleci.com/t/got-command-not-found-error-when-using-gcloud/17845 "2017-11-03T00:59:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itleo31](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/itleo31/32/17332_2.png) [@itleo31](https://discuss.circleci.com/u/itleo31)\
**Post date:** [November 3, 2017, 12:59am UTC](https://discuss.circleci.com/t/got-command-not-found-error-when-using-gcloud/17845/1 "2017-11-03T00:59:26Z")

</div>

Hi, I’m trying to use gcloud in my project, but seem like my machine not has gcloud installed. Please help. Here is the error I got.

sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update  
sudo: /opt/google-cloud-sdk/bin/gcloud: command not found

sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update returned exit code 1

Action failed: sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update

— More info:  
Platform: OSX  
Circle: 1.0

— And this is the full circle.yml  
machine:  
xcode:  
version: 9.1  
ruby:  
version: 2.4.2  
environment:  
XCODE\_SCHEME: Klozr  
XCODE\_WORKSPACE: Klozr.xcworkspace  
dependencies:  
pre:  
- xcrun instruments -w “iPhone 7 (11.0) [” || true  
- mkdir -p ./build

```
- echo $GCLOUD_SERVICE_KEY | base64 --decode > ${HOME}/gcloud-service-key.json
- sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update
- sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
- sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT
- /opt/google-cloud-sdk/bin/gsutil -m rsync -d -r ${GCLOUD_BUCKET_URL}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH} ./build

```

override:  
- bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 --without development  
cache\_directories:  
- vendor/bundle  
test:  
override:  
- bundle exec fastlane testci  
post:  
- /opt/google-cloud-sdk/bin/gsutil -m rsync -d -r ./build {GCLOUD\_BUCKET\_URL}/{CIRCLE\_PROJECT\_REPONAME}/${CIRCLE\_BRANCH}  
deployment:  
beta\_distribution:  
branch: master  
commands:  
- bundle exec fastlane beta  
release:  
branch: release  
commands:  
- bundle exec fastlane release

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:35am UTC](https://discuss.circleci.com/t/got-command-not-found-error-when-using-gcloud/17845/2 "2018-06-18T11:35:16Z")

</div>

Closed on June 18, 2018, 11:35am UTC


