【发布时间】:2021-07-17 23:52:43
【问题描述】:
我尝试通过命令行和自制软件在 mac OS 10 上安装 google-cloud-sdk,但我得到了同样的错误。
错误:(gcloud.components.update) 提供的路径必须存在。
我不明白如果我正在下载压缩文件、解压缩并运行安装脚本,路径怎么会丢失。我还能做些什么来让安装正常工作?
我尝试了各种解决方法。我已经升级了自制软件。使用了各种 sudo 命令。我仍然得到同样的错误。
自制软件安装的输出如下:
○ → 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.
【问题讨论】:
-
你能试试关注这个link吗?我可以知道您是否能够在没有错误的情况下完成步骤 2c 吗?如果出现权限错误,很可能
~/.config/gcloud只能由 root 访问。运行命令后,请让我知道输出。 -
这是运行步骤 2c 的结果:○ → ./google-cloud-sdk/bin/gcloud init 检查网络连接...完成。错误:可达性检查失败。无法通过 httplib2 访问dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (SSLCertVerificationError) 无法通过请求访问dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (SSLError) 网络连接问题可能是由于代理或防火墙设置造成的。
-
我的错误已修复。搜索上面的错误。发现这个问题stackoverflow.com/questions/65208575/… 按照 John Hanley 给出的评分最高的答案中的说明基本上卸载了所有版本的 Python。 (macupdate.com/app/mac/5880/python/uninstall) 清理自制程序。重新运行 ~/google-cloud-sdk/bin/gcloud init 得到了同样的错误,但这次它为我提供了继续的选项并将我发送到谷歌登录页面。已登录。成功完成。
-
很高兴知道。请发布它作为答案。这样其他人就可以支持您的解决方案
标签: macos google-cloud-platform google-cloud-sdk