2

I have tried installing google-cloud-sdk on a mac OS 10 via the command line and homebrew and I get the same error.

ERROR: (gcloud.components.update) The provided path must exist.

I don't understand how the path could be missing if I am downloading a zipped file, extracting it and running the install script. What more can I do to get the install to work?

I have tried various work-arounds. I have upgraded homebrew. Used various sudo commands. And I still get the same error.

Output from homebrew install below:

○ → brew install --cask google-cloud-sdk
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
gnupg@2.2
==> Updated Formulae
Updated 1 formula.
==> Updated Casks
Updated 13 casks.

==> Caveats
google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:

  for bash users
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc"
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"

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

  for fish users
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc"

==> Downloading https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
Already downloaded: /Users/wxc3426/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
Warning: No checksum defined for cask 'google-cloud-sdk', skipping verification.
All formula dependencies satisfied.
==> Installing Cask google-cloud-sdk
Beginning update. This process may take several minutes.
ERROR: (gcloud.components.update) The provided path must exist.
==> Purging files for version latest of Cask google-cloud-sdk
Error: Failure while executing; `/usr/bin/env CLOUDSDK_PYTHON=/usr/local/opt/python@3.9/bin/python3 /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/install.sh --usage-reporting false --bash-completion false --path-update false --rc-path false --quiet` exited with 1. Here's the output:
Welcome to the Google Cloud SDK!
Beginning update. This process may take several minutes.
ERROR: (gcloud.components.update) The provided path must exist.

This will install all the core command line tools necessary for working with
the Google Cloud Platform.
Donnald Cucharo
  • 3,866
  • 1
  • 10
  • 17
wcooper
  • 31
  • 1
  • 3
  • Could you try following this [link](https://cloud.google.com/sdk/docs/quickstart#mac)? May I know if you're able to finish until Step 2c without errors? If you got a permission error, it is very likely that `~/.config/gcloud` is only accessible by root. After running the command, please let me know of the output. – Donnald Cucharo Apr 26 '21 at 01:50
  • This is the result of the running Step 2c: ○ → ./google-cloud-sdk/bin/gcloud init Checking network connection...done. ERROR: Reachability Check failed. Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json with httplib2 (SSLCertVerificationError) Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json with requests (SSLError) Network connection problems may be due to proxy or firewall settings. – wcooper Apr 26 '21 at 15:55
  • I got my error fixed. Searched for the error above. Found this question https://stackoverflow.com/questions/65208575/google-cloud-sdk-throws-reachability-check-failed-error Followed the instructions in the top rated answer given by John Hanley Basically uninstalled all versions of Python. ( https://www.macupdate.com/app/mac/5880/python/uninstall ) Cleaned up homebrew. Re-ran ~/google-cloud-sdk/bin/gcloud init Got the same errors but this time it offered me the option to continue and sent me to a google login page. Logged in. Completed successfully. – wcooper Apr 26 '21 at 19:27
  • That's great to know. Please post it as an answer. This way others can upvote your solution – Donnald Cucharo Apr 27 '21 at 06:03

3 Answers3

1

I got my error fixed. Searched for the error above.

Found this question stackoverflow.com/questions/65208575/…

Followed the instructions in the top rated answer given by John Hanley

Basically uninstalled all versions of Python. ( macupdate.com/app/mac/5880/python/uninstall ) Cleaned up homebrew. Re-ran ~/google-cloud-sdk/bin/gcloud init Got the same errors but this time it offered me the option to continue and sent me to a google login page. Logged in. Completed successfully.

wcooper
  • 31
  • 1
  • 3
0

Regarding the steps that wooper and Dondi posted, here could be a possible answer:

Follow these steps at least until 2c, and if a permission error is shown, is very likely that ~/.config/gcloud is only accessible by root.

If after running ./google-cloud-sdk/bin/gcloud init you get the following error:

ERROR: Reachability Check failed. Cannot reach dl.google.com/dl/cloudsdk/channels/rapid/components-2.json with httplib2 (SSLCertVerificationError) Cannot reach dl.google.com/dl/cloudsdk/channels/rapid/components-2.json with requests (SSLError) Network connection problems may be due to proxy or firewall settings.

You may want to check the accepted answer from this post to uninstall all versions of Python and clean up homebrew.

This should let you log in via Google login page.

Jordi
  • 127
  • 1
  • 4
0

I found some env variable (such as cert) is set that is invalid.

  1. download google cloud sdk
  2. unzip and go to /bin directory
  3. gcloud config list

Observe any env variable that is based on path and is incorrectly set. From there, you can ./gcloud config set {env} {correct_value} or reconfigure env from scratch

Adel
  • 161
  • 6