gcloud component update fails

情到浓时终转凉″ 提交于 2019-12-21 07:27:33

问题


I've deployed to VM's running Debian on GCE and have cron scripts that use gcloud commands.

I noticed that gcloud components update retuns this error

ERROR: (gcloud.components.update) The component manager is disabled for this installation

My mac works fine to update gcloud and add new components.

The built in gcloud tools that were in the VM image won't update. I have not found out how to enable the component manager.


回答1:


UPDATED

Now you can use sudo apt-get install google-cloud-sdk command to install or update Google Cloud SDK.

You may need to add Cloud SDK repository in your Linux machine. This is the instructions.


Note: The following workaround should not be used anymore.

The component manager is enabled on latest images and gcloud components update command should be working now.

In case you're still experiencing this issue, use the following command to enable updater:

sudo sed -i -e 's/true/false/' /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json



回答2:


You cannot update components using the built in SDK tools on a compute engine instance. However you can download another local copy of the SDK from https://cloud.google.com/sdk/ (curl https://sdk.cloud.google.com | bash) and update your path accordingly to use the new SDK install, and you will have the component manager enabled.




回答3:


Came here while trying to gcloud components install [x] on a Docker container from google/cloud-sdk and getting the same error (I am probably not the only one on this situation).

Unfortunately, apt-get install google-cloud-sdk (as suggested on the most upvoted answer) didn't help.

But the ugly sed on config file did the trick. Dirty but efficient fix (for the moment).

RUN sed -i -e 's/"disable_updater": true,/"disable_updater": false,/' /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json



回答4:


Building off of Vilas's explanation above: you can't run the updater for the built in gcloud image. However you can install a copy of gcloud outside of the package manager and run the updater on that gcloud install.




回答5:


You can now run sudo apt-get install google-cloud-sdk on the Google Compute Engine default images to update the Cloud SDK.



来源:https://stackoverflow.com/questions/28130637/gcloud-component-update-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!