Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

anthoscli ERROR on installing Google Cloud SDK on Apple Silicon / Big Sur

I am searching for the solution for some weeks now. A couple weeks ago I received the new MacBook Pro with the Apple Silicon processor and with Big Sur installed on it. When I tried to install Google Cloud SDK, because I need that for my work, I get my first problem. I opened the terminal and used "curl https://sdk.cloud.google.com | bash" to start the installation.

After I received the question if I want to help to improve Google Cloud SDK and hit 'N' this error follows. Also when I hit 'Y'...

ERROR: (gcloud.components.update) The following components are unknown [anthoscli].

On the internet I can't found something about this error. The only thing what I have found on anthoscli is that I think it has something to do with Kubernetes and/or Docker. So I tried to install Docker first, only they are not ready for Apple Silicon yet...

I can't imagine being the only one with this problem so I hope someone here can help me further.

like image 416
Robbie Veldwijk Avatar asked Dec 01 '20 08:12

Robbie Veldwijk


People also ask

How do I install Google Cloud CLI interactive?

Interactive installation The installer lets you download, install, and set up the latest version of Google Cloud CLI in an interactive mode. When you run the installer, it downloads Google Cloud CLI components and installs them on the local system.

How do I get Started with Google Cloud SDK?

To access the Google Cloud APIs using a supported programming language, you can download the Cloud Client Libraries. These instructions are for installing Cloud SDK. For information about installing additional components, such as gcloud tool commands at the alpha or beta release level, see Managing SDK components.

How do I initialize the Google Cloud CLI using PowerShell?

exec -l $SHELL To initialize the Google Cloud CLI environment, run gcloud init: gcloud init Windows (Installer) Download the Google Cloud CLI installer. Alternatively, open a PowerShell terminal and run the following PowerShell commands:

How do I Manage my Cloud SDK installation?

After you have installed Cloud SDK, you can use commands in the gcloud components command group to manage your installation. This includes viewing installed components, adding and removing components, and upgrading to a new version (or downgrading to a specific version) of Cloud SDK.


3 Answers

It's a known issue "Apple Silicon Installer does not exist"

The workaround from the above link is:

  1. Attempt install: curl https://sdk.cloud.google.com | bash
  2. Run installer manually using files from above failed install ./google-cloud-sdk/bin/gcloud components install core gsutil
  3. Re-run init: ./google-cloud-sdk/bin/gcloud init
like image 116
Ryan Horrisberger Avatar answered Oct 18 '22 18:10

Ryan Horrisberger


I just tested on Apple M1 MBP Big Sur 11.1, which works for me.

Followed mager.co blogpost-How to install gcloud on an M1 Mac

Full steps as following:

  1. Install homebrew package management first

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  2. Install Python 3.9.1 use pyenv

    brew install pyenv
    pyenv install 3.9.1
    pyenv global 3.9.1
    
  3. Set an env variable letting the gcloud installer know which version of Python to use:

    export CLOUDSDK_PYTHON=python3

  4. Download the SDK and start the install, which I ran into ERROR the following components are unknown [anthoscli, kuberun]:

    curl https://sdk.cloud.google.com | bash

  5. Thus manually run the install.sh script

    cd ~/google-cloud-sdk
    ./install.sh --override-components core gcloud-deps bq gcloud gsutil
    
like image 22
Brent Chang Avatar answered Oct 18 '22 20:10

Brent Chang


I got gcloud to install by installing under Rosetta 2.

curl https://sdk.cloud.google.com > install.sh
chmod +x install.sh
arch -x86_64 install.sh --disable-prompts
# restart shell
gcloud help

I don't think Apple did a good job of advertising this feature, because I only found it in a random Hacker News thread. I've used this strategy quite a bit and added this to my shell's rc file.

x86() {
    arch -x86_64 $1
}
x86 install.sh --disable-prompts
like image 5
ivanmartinvalle Avatar answered Oct 18 '22 20:10

ivanmartinvalle