我试图从gcloud命令行工具安装几个GCP组件,并且总是得到相同的错误:
$ gcloud components list
Your current Cloud SDK version is: 146.0.0
The latest available version is: 146.0.0
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Components │
├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│ Status │ Name │ ID │ Size │
├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Not Installed │ App Engine Go Extensions │ app-engine-go │ 47.9 MiB │
│ Not Installed │ Bigtable Command Line Tool │ cbt │ 3.8 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 │ 21.0 MiB │
│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr │ 3.3 MiB │
│ Not Installed │ gcloud app Java Extensions │ app-engine-java │ 128.3 MiB │
│ Not Installed │ gcloud app Python Extensions │ app-engine-python │ 7.2 MiB │
│ Not Installed │ kubectl │ kubectl │ 11.5 MiB │
│ Installed │ BigQuery Command Line Tool │ bq │ < 1 MiB │
│ Installed │ Cloud SDK Core Libraries │ core │ 5.7 MiB │
│ Installed │ Cloud Storage Command Line Tool │ gsutil │ 2.8 MiB │
│ Installed │ Default set of gcloud commands │ gcloud │ │
│ Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB │
│ Installed │ gcloud Beta Commands │ beta │ < 1 MiB │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘然后尝试安装库贝克尔
$ gcloud components install kubectl
You cannot perform this action because this Cloud SDK installation is
managed by an external package manager. If you would like to get the
latest version, please see our main download page at:
https://cloud.google.com/sdk/
ERROR: (gcloud.components.install) The component manager is disabled for this installation知道为什么会产生这个错误吗?
发布于 2017-03-10 23:02:52
Cloud组件管理器仅在不通过另一个包管理器安装SDK时才能工作。如果要使用组件管理器,可以使用以下方法之一进行安装:
https://cloud.google.com/sdk/downloads#versioned
https://cloud.google.com/sdk/downloads#interactive
我们的deb和yum repos中有其他的软件包,因此所有相同的组件都可用,您只需要使用现有的包管理器来安装它们:
发布于 2018-06-28 00:38:04
要为Ubuntu添加更多的上下文,以下是我在使用google-cloud-sdk包管理器安装apt-get时所采取的步骤
sudo apt-get remove google-cloud-sdktar.gz包tar -zxf google-cloud-sdk-*./google-cloud-sdk/install.shgcloud命令可用:- Running `source ~/.bashrc` or
- Closing your current terminal session and opening a new one
使用此安装,我能够使用以下命令更新和安装kubectl
gcloud components update
gcloud components install kubectl发布于 2018-10-02 08:09:31
如果apt或apt-get没有卸载gcloud,请尝试使用snap remove google-cloud-sdk。
如果您使用更新的Ubuntu版本,情况可能是这样的(例如。( LTS 18.04)
https://stackoverflow.com/questions/42697026
复制相似问题