Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Google Cloud components error from gcloud command

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 │ └───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘ 

Then attempting to install 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?

like image 689
Ivan Fernandez Avatar asked Mar 09 '17 13:03

Ivan Fernandez


People also ask

How use gcloud command line?

Download and install the gcloud CLI If you're using Cloud Shell, the gcloud CLI is available automatically and you don't need to install it. Otherwise, download and install the gcloud CLI and then initialize it. By default, the gcloud CLI installs commands that are at the General Availability level.


1 Answers

To add some more context to this answer for the Ubuntu OS, these are the steps that I took when I had already installed google-cloud-sdk using the apt-get package manager

  1. Remove the existing installation using

    sudo apt-get remove google-cloud-sdk

  2. Navigate to https://cloud.google.com/sdk/docs/quickstart-linux and follow the steps to download the correct tar.gz package for your system

  3. Navigate to the download directory and unzip the archive using

    tar -zxf google-cloud-sdk-*

  4. Install the SDK using

    ./google-cloud-sdk/install.sh

  5. Make the gcloud command available by either:

    • Running source ~/.bashrc or
    • Closing your current terminal session and opening a new one

Using this installation I was then able to update and install kubectl with the following commands

gcloud components update gcloud components install kubectl 
like image 51
ScottMcC Avatar answered Sep 26 '22 04:09

ScottMcC