我在Macbook Pro osX 0.11.6上为App Engine设置了Golang: 去版本go1.8 darwin / amd64
我使用
将Cloud SDK更新为148.0.0sudo / usr / local / google-cloud-sdk / bin / gcloud components update
╔════════════════════════════════════════════════════════════╗
╠═ 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”组件?
答案 0 :(得分:8)
您可以通过运行
查看可用组件列表gcloud components list
默认情况下,未安装许多组件,其中有一些组件而且有些组件相当大。如果未安装组件,则可以通过
安装gcloud components install app-engine-go
由于您已在机器范围内安装了gcloud,因此需要使用sudo
运行最后一个命令。