为什么Gcloud无法安装”app-engine-go”组件?

huangapple go评论79阅读模式
英文:

Why isn't Gcloud installing the "app-engine-go" component?

问题

我正在为我的Macbook Pro osX 0.11.6设置Golang用于App Engine:

go version go1.8 darwin/amd64

我使用以下命令更新了Cloud SDK到148.0.0:

sudo /usr/local/google-cloud-sdk/bin/gcloud components update

我被告知运行的命令是"sudo /usr/local/google-cloud-sdk/bin/gcloud ..."。

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

英文:

I'm setting up Golang for App Engine on my Macbook Pro osX 0.11.6:
go version go1.8 darwin/amd64

I updated Cloud SDK to 148.0.0 with

sudo /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          ═╣   
╚════════════════════════════════════════════════════════════╝  

Performing post processing steps...done.

$ 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 ...  

What is the command I'm being told to run "sudo /usr/local/google-cloud-sdk/bin/gcloud ..." ?

Why isn't the "app-engine-go" component being installed?

答案1

得分: 8

你可以通过运行以下命令查看可用组件的列表:

gcloud components list

许多组件默认情况下未安装,其中有一些组件相当大。如果未安装某个组件,你可以通过以下命令进行安装:

gcloud components install app-engine-go

由于你已经在机器上全局安装了 gcloud,所以你需要使用 sudo 来运行最后一个命令。

英文:

You can see list of available components by running

gcloud components list

Many components are not installed by default, there are a few of them and some are rather large. If component is not installed you can install it via

gcloud components install app-engine-go

Since you have installed gcloud machine wide you would need to run last command with sudo.

huangapple
  • 本文由 发表于 2017年3月23日 01:24:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/42958662.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定