从gcloud命令安装Google Cloud组件错误 [英] Install Google Cloud components error from gcloud command

查看:941
本文介绍了从gcloud命令安装Google Cloud组件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从gcloud命令行安装几个GCP组件,并始终得到相同的错误:

  $ gcloud组件列表

您当前的Cloud SDK版本为:146.0.0
最新版本为:146.0.0

┌────────── ────────────────────────────────────────────────── ─────────────────────────────────────────────────┐
│组件│
├─────────────────────────────────────── ────────────────────────────────┬───────────────── ─ ────────────────────
│状态│名称│身份证号│大小│
├──────────── ───┼────────────────────────────────────────────── ────────────────────────────────────────────
│未安装│App Engine Go Extensions│app-engine-go│47.9 MiB│
│未安装│Bigtable命令行工具│cbt│3.8 MiB│
│未安装│Cloud Datalab命令行工具│datalab│< 1 MiB│
│未安装│云数据存储模拟器│云数据存储模拟器│15.4 MiB│
│未安装│云数据存储模拟器(旧版)│gcd-emulator│38.1 MiB│
│未安装│云端发布/子模拟器│pubsub-emulator│21.0 MiB│
│未安装│谷歌容器注册表的Docker凭证助手│码头证书-gcr│3.3 MiB│
│未安装│gcloud应用程序Java扩展│app-engine-java│128.3 MiB│
│未安装│gcloud应用程序Python扩展│app-engine-python│7.2 MiB│
│未安装│kubectl│kubectl│11.5 MiB│
│安装│BigQuery命令行工具│bq │< 1 MiB│
│已安装│Cloud SDK核心库│核心│5.7 MiB│
│已安装│云端存储命令行工具│gsutil│2.8 MiB│
│已安装│默认gcloud命令集│gcloud││
│已安装│gcloud Alpha命令│alpha│< 1 MiB│
│已安装│gcloud Beta命令│beta│< 1 MiB│
└────────────────────────────────────────── ────────────────────────────┴───────────────────── ──────────────────

$ gcloud组件安装kubectl
您无法执行此操作,因为此Cloud SDK安装是由外部软件包管理器管理的
。如果您想获得
最新版本,请参阅我们的主要下载页面:

  https:// cloud.google.com/sdk/ 

错误:(gcloud.components.install)此安装禁用组件管理器

任何想法为什么会引发此错误?

解决方案

Cloud SDK组件管理器只有在您不通过其他软件包管理器安装SDK时才有效。如果您想使用组件管理器,可以使用以下方法之一进行安装:

https://cloud.google.com/sdk/downloads#versioned



https://cloud.google.com/sdk/downloads#interactive



其他软件包可在我们的deb和yum软件仓库中使用,因此所有相同的组件都可用,您只需使用现有软件包管理器来安装它们即可:



https://cloud.google.com/sdk/downloads#apt-get



https://cloud.google .com / sdk / downloads#yum


I am trying to install several GCP components from gcloud command line and get the same error always:

$ 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

Any idea why is this error raised?

解决方案

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

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆