【问题标题】:Can't install GCloud on macOS Big Sur无法在 macOS Big Sur 上安装 GCloud
【发布时间】:2021-11-26 03:37:42
【问题描述】:

一步一步做说明:

https://cloud.google.com/sdk/docs/quickstart

  1. 解压存档
  2. 正在运行./install.sh

收到此消息:
欢迎使用 Google Cloud SDK!

仅此而已。

command not found: gcloud

有什么办法让它工作吗?

【问题讨论】:

  • 您使用的是什么 CPU 平台,因为我们为 macOS 提供了三个平台?您是否也将此链接引用到install GCloud for macOS
  • @RobertG 我尝试了其中的两个,首先是(x86_64),然后是(arm64,Apple M1 Silicon)。正如我的问题中提到的,我试图通过您提供的链接精确地做到这一点。最后,我通过云控制台上的 Web 界面终端仿真完成了我的任务
  • 嗨,OP。让我们知道答案是否有帮助。如果它有用,请考虑支持它。如果它回答了你的问题,那么请接受它。这样其他人就知道你得到了(足够的)帮助。
  • 不,它没有...

标签: google-cloud-sdk


【解决方案1】:

我成功安装了 GCloud,应该有说明

Modify profile to update your $PATH and enable shell command 
completion?
 
Do you want to continue (Y/n)?

输入y并回车,会出现下一行指令:

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment.
 
Enter a path to an rc file to update, or leave blank to use 
[/Users/{userName}/.bash_profile]:  
Backing up [/Users/{userName}/.bash_profile] to [/Users/{userName}/.bash_profile.backup].
[/Users/{userName}/.bash_profile] has been updated.
 
==> Start a new shell for the changes to take effect.

之后,您需要输入exec bash -l 来重新启动您的终端,而不是完全关闭它。

作为替代方案,以下是一些相关链接,您可能会发现它们对于在 macOS 上为 x86/x64 和 M1 芯片设置 GCloud 很有用:

【讨论】:

  • 很遗憾我没有看到这条指令(只有Welcome to the Google Cloud SDK!
  • 请输入python -V查看当前安装的Python版本。支持的版本是 Python 3(3.7 推荐)和 Python 2(2.7.9 或更高版本)。如果 GCloud 被您的代理或防火墙阻止,请检查您的网络。
猜你喜欢
  • 2021-06-08
  • 2021-03-01
  • 2021-09-04
  • 2021-07-20
  • 2021-08-24
  • 2021-06-19
  • 2021-08-04
  • 2021-05-31
  • 2021-06-08
相关资源
最近更新 更多