gpt4 book ai didi

go - 为什么 Gcloud 不安装 "app-engine-go"组件?

转载 作者:IT王子 更新时间:2023-10-29 00:52:14 27 4
gpt4 key购买 nike

我正在我的 Macbook Pro osX 0.11.6 上为 App Engine 设置 Golang:去版本go1.8 darwin/amd64

我将 Cloud SDK 更新为 148.0.0

sudo/usr/local/google-cloud-sdk/bin/gcloud 组件更新

╔════════════════════════════════════════════════════════════╗  
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: BigQuery Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud SDK Core Libraries ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud Storage Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: gcloud cli dependencies ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud SDK Core Libraries ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation ═╣
╚════════════════════════════════════════════════════════════╝

执行后处理步骤...完成。

$ dev_appserver.py app.yaml

This action requires the installation of components: [app-engine-go]  

Traceback (most recent call last):
File "/usr/local/google-cloud-sdk/bin/dev_appserver.py", line 44, in <module>
main()
File "/usr/local/google-cloud-sdk/bin/dev_appserver.py", line 23, in main
command=__file__)
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 189, in EnsureInstalledAndRestart
return manager._EnsureInstalledAndRestart(components, msg, command)
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 1139, in _EnsureInstalledAndRestart
restart_args=restart_args):
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 665, in Install
restart_args=restart_args)
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 742, in Update
config.EnsureSDKWriteAccess(self.__sdk_root)
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 195, in EnsureSDKWriteAccess
raise exceptions.RequiresAdminRightsError(sdk_root)
googlecloudsdk.core.exceptions.RequiresAdminRightsError: You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/usr/local/google-cloud-sdk].

Re-run the command with sudo: sudo /usr/local/google-cloud-sdk/bin/gcloud ...

我被告知运行“sudo/usr/local/google-cloud-sdk/bin/gcloud ...”的命令是什么?

为什么没有安装“app-engine-go”组件?

最佳答案

您可以通过运行查看可用组件列表

gcloud components list

默认情况下没有安装许多组件,其中有一些,有些相当大。如果未安装组件,您可以通过以下方式安装它

gcloud components install app-engine-go

由于您已经在计算机范围内安装了 gcloud,因此您需要使用 sudo 运行最后一个命令。

关于go - 为什么 Gcloud 不安装 "app-engine-go"组件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42958662/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com