I\'m trying to install the Google Cloud SDK (https://cloud.google.com/sdk/docs/quickstart-mac-os-x) and get this error:
ERROR: (gcloud.components.list) Failed to f
After turning off ipv6 support, the tool works like a charm. Looks like gcloud can not work gracefully with ipv6...
Disable ipv6:
networksetup -setv6off Wi-Fi
Enable ipv6:
networksetup -setv6automatic Wi-Fi
Note: While investigating this, I was also able to make it work by using a very long timeout — 120 seconds. This wouldn't be practical, though, for most use cases due to the long delays it would introduce for each command.
The timeout is located in google-cloud-sdk/lib/googlecloudsdk/core/updater/installers.py
at line 36 called TIMEOUT_IN_SEC
Disable IPV6 :
sysctl net.ipv6.conf.all.disable_ipv6=1
Disabling ipv6 didn't work for me. I tried a bunch of things before getting it to work. I upgraded to mojave OSX before getting the issues.
I updated mac headers as mentioned here:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Rebooted then reinstalled python2:
brew reinstall python2
At this point the issue still persisted, decided to reinstall gcloud and came across this:
I was using zsh so I added the followin .zshrc
:
source <PATH to gcloud sdk>/google-cloud-sdk/path.zsh.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.zsh.inc
For bash:
source <PATH to gcloud sdk>/google-cloud-sdk/path.bash.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.bash.inc`
Then a gcloud init
got me resetting some proxy configuration that was probably the main issue from the start.