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

6

12

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.

Greyson answered 1/12, 2020 at 8:2 Comment(0)
S
-2

Please follow the steps mentioned in the following Google Cloud SDK Installation Documentation to install Google Cloud SDK on MacOS:

  1. Cloud SDK requires Python. Follow the next documentation on how to choose and configure your Python interpreter

  2. Download the MacOS package from the Google Cloud SDK Documentation.

2.1) Extract the archive to any location on your file system. On macOS, this can be achieved by opening the downloaded .tar.gz archive file in the preferred location.

2.2) Optional. Use the install script to add Cloud SDK tools to your path -->

 ./google-cloud-sdk/install.sh

2.3) Close and Open a new terminal so that the changes take effect.

2.4) Run gcloud init to initialize the SDK:

./google-cloud-sdk/bin/gcloud init

As I can see that you have use the Google Cloud SDK Installer to install Google Cloud SDK on MacOS. Please try again the following steps to install Google Cloud SDK using the installer:

  1. Enter the following at a command prompt:
   curl https://sdk.cloud.google.com | bash
  1. Restart your shell:
exec -l $SHELL
  1. Run gcloud init to initialize the gcloud environment:
gcloud init

In case you want to install Google Cloud SDK through the interactive installer, and you are getting the error mentioned above, You can create an issue on Google's Public Issue Tracker for further investigation. However also please try to install the Google Cloud SDK without the installer as I mentioned before.

Shooin answered 1/12, 2020 at 15:8 Comment(1)
Thanks for those links. I used those files to install it and it worked for me. Thanks a lot!Greyson
K
11

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
Knockabout answered 1/2, 2021 at 15:16 Comment(1)
Worked nicely for me. I normally install using brew - it would be nice if we could update the formula to include this workaround.Hepato
G
5

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
Gigue answered 3/12, 2020 at 3:39 Comment(0)
S
4

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
    
Scibert answered 17/2, 2021 at 6:15 Comment(0)
A
0

The easiest way to install Google Cloud SDK is with homebrew, but Homebrew doesn't have an arm64 variant for M1 yet. Nonetheless, I've outlined steps to install and use it on M1 Macs: https://mcmap.net/q/167641/-how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook

1. Installing gcloud SDK

After installing your Homebrew on your M1 Mac, in your Rosetta Terminal, run the following command:

brew install --cask google-cloud-sdk

2. Linking gcloud to $PATH

Once Homebrew has it installed, you'll need to add it to your path. In the last few lines it will show you the path to set your source:

source-gcloud-homebrew-m1

From the screenshot above, I'll have to run the following to set the command in my $PATH:

source /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc
source /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc

3. Using gcloud

Once linked, you can use the gcloud command in your terminal:

gcloud -v

4. Outdated Python

In case your python is outdated (see Google Cloud SDK Requirements), you can use Homebrew to update it by running:

brew upgrade

You can view your python version when listing out your Homebrew packages:

brew outdated
Adrell answered 21/2, 2021 at 5:17 Comment(0)
T
0

This happens when you have MAC M1 chip so you might need to install manually for this i choose to go with Google given method

muhasan@Admins-MacBook-Pro ~ % curl https://sdk.cloud.google.com | bash

Output :

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area                             ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool                   ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool (Platform Spec... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool              ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Default set of gcloud commands               ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Google Cloud CLI Core Libraries (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: anthoscli                                    ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: anthoscli                                    ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation          ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done.                                                                                                                                                                                                     

Update done!
Topfull answered 28/3, 2022 at 18:31 Comment(0)
S
-2

Please follow the steps mentioned in the following Google Cloud SDK Installation Documentation to install Google Cloud SDK on MacOS:

  1. Cloud SDK requires Python. Follow the next documentation on how to choose and configure your Python interpreter

  2. Download the MacOS package from the Google Cloud SDK Documentation.

2.1) Extract the archive to any location on your file system. On macOS, this can be achieved by opening the downloaded .tar.gz archive file in the preferred location.

2.2) Optional. Use the install script to add Cloud SDK tools to your path -->

 ./google-cloud-sdk/install.sh

2.3) Close and Open a new terminal so that the changes take effect.

2.4) Run gcloud init to initialize the SDK:

./google-cloud-sdk/bin/gcloud init

As I can see that you have use the Google Cloud SDK Installer to install Google Cloud SDK on MacOS. Please try again the following steps to install Google Cloud SDK using the installer:

  1. Enter the following at a command prompt:
   curl https://sdk.cloud.google.com | bash
  1. Restart your shell:
exec -l $SHELL
  1. Run gcloud init to initialize the gcloud environment:
gcloud init

In case you want to install Google Cloud SDK through the interactive installer, and you are getting the error mentioned above, You can create an issue on Google's Public Issue Tracker for further investigation. However also please try to install the Google Cloud SDK without the installer as I mentioned before.

Shooin answered 1/12, 2020 at 15:8 Comment(1)
Thanks for those links. I used those files to install it and it worked for me. Thanks a lot!Greyson

© 2022 - 2024 — McMap. All rights reserved.