anthoscli ERROR on installing Google Cloud SDK on Apple Silicon / Big Sur
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
It's a known issue "Apple Silicon Installer does not exist"
The workaround from the above link is:
- Attempt install:
curl https://sdk.cloud.google.com | bash
- Run installer manually using files from above failed install
./google-cloud-sdk/bin/gcloud components install core gsutil
- Re-run init:
./google-cloud-sdk/bin/gcloud init