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.
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.
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.
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:
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.
It's a known issue "Apple Silicon Installer does not exist"
The workaround from the above link is:
curl https://sdk.cloud.google.com | bash
./google-cloud-sdk/bin/gcloud components install core gsutil
./google-cloud-sdk/bin/gcloud init
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:
Install homebrew package management first
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Python 3.9.1 use pyenv
brew install pyenv
pyenv install 3.9.1
pyenv global 3.9.1
Set an env variable letting the gcloud installer know which version of Python to use:
export CLOUDSDK_PYTHON=python3
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
Thus manually run the install.sh
script
cd ~/google-cloud-sdk
./install.sh --override-components core gcloud-deps bq gcloud gsutil
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With