从 gcloud 命令安装 Google Cloud 组件错误 [英] Install Google Cloud components error from gcloud command
问题描述
我正在尝试从 gcloud 命令行工具安装多个 GCP 组件,并且总是得到同样的错误:
I am trying to install several GCP components from the gcloud command-line tool and always get the same error:
$ 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 │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
然后尝试安装 kubectl
$ 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
知道为什么会出现这个错误吗?
Any idea why is this error raised?
推荐答案
Cloud SDK 组件管理器仅在您不通过其他包管理器安装 SDK 时才有效.如果要使用组件管理器,可以使用以下方法之一进行安装:
The Cloud SDK component manager only works if you don't install the SDK through another package manager. If you want to use the component manager, you can install using one of these methods:
https://cloud.google.com/sdk/downloads#versioned
https://cloud.google.com/sdk/downloads#interactive
我们的 deb 和 yum 存储库中提供了其他软件包,因此所有相同的组件都可用,您只需要使用现有的软件包管理器来安装它们:
Additional packages are available in our deb and yum repos so all the same components are available, you just need to use your existing package manager to install them:
https://cloud.google.com/sdk/downloads#apt-get
https://cloud.google.com/sdk/downloads#yum
这篇关于从 gcloud 命令安装 Google Cloud 组件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!