【问题标题】:If Google Cloud SDK is uninstalled from Google Cloud Shell how to install it again?如果从 Google Cloud Shell 中卸载了 Google Cloud SDK,如何重新安装它?
【发布时间】:2022-01-16 18:01:25
【问题描述】:

在使用 Qwiklabs 时,当我尝试像 gcloud init 这样的命令或使用命令 gcloudgsutilbq 时,我收到错误:“gcloud command is not found”。

我想我错误地从 Cloud Shell 卸载了 SDK。

【问题讨论】:

  • 在我的 Cloud Shell 中,gcloud 位于 /usr/bin 中。您是否明确删除了 GCP SDK?当我运行apt list --installed ...我在我的安装列表中找到google-cloud-sdk
  • 我是谷歌云的新手,我想我已经从 shell 中卸载了云 SDK。现在我已经安装了它,但它再次显示相同的错误。当我运行 gcloud init、gsutil、bq 等命令时,它告诉我 gcloud command not found 。我必须在哪个目录中安装 cloud sdk?

标签: google-cloud-platform google-cloud-shell


【解决方案1】:

只需从右侧的 3 个点重新启动 Cloud Shell

此操作将使用here 指定的新虚拟机将您的 Cloud Shell 主目录恢复到干净状态。这包括 gcloud、gsutil 或 bq 命令功能。

【讨论】:

  • 我跑了2次qwiklab,还是要重启cloud shell???
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-04-27
  • 2016-07-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-14
相关资源
最近更新 更多