谷歌云sdk安装错误:(gcloud.components.update)提供的路径必须存在



我曾尝试通过命令行和自制程序在mac OS 10上安装谷歌云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.

我修复了错误。已搜索上述错误。

发现这个问题stackoverflow.com/questions/65208575/…

遵循John Hanley 给出的最高评分答案中的说明

基本上卸载了Python的所有版本。(macupdate.com/app/mac/5880/python/uninstall(清理了自制程序。重新运行~/googlecloud-sdk/bin/gcloud-init出现了同样的错误,但这次它为我提供了继续的选项,并将我发送到谷歌登录页面。已登录。已成功完成。

关于wooper和Dondi发布的步骤,这里可能有一个答案:

按照这些步骤至少执行到2c,如果显示权限错误,则很可能~/.config/gcloud只能由root访问。

如果运行./google-cloud-sdk/bin/gcloud init后出现以下错误:

错误:可达性检查失败。无法访问dl.google.com/dl/cloudsdk/channels/rapid/components-2.jsonhttplib2(SSLCertVerificationError(无法访问dl.google.com/dl/cloudsdk/channels/rapid/components-2.json请求(SSLError(网络连接问题可能是由于代理或防火墙设置。

您可能需要检查本文中已接受的答案,以卸载所有版本的Python并清理自制程序。

这应该可以让你通过谷歌登录页面登录。

我发现一些env变量(如cert(被设置为无效。

  1. 下载谷歌云sdk
  2. 解压缩并转到/bin目录
  3. gcloud配置列表

观察任何基于路径且设置不正确的env变量。从那里,你可以/gcloud配置设置{env}{correct_value}或从头开始重新配置env

相关内容

最新更新