【问题标题】:Why the gcloud components update command always show restarting command为什么 gcloud components update 命令总是显示重启命令
【发布时间】:2019-11-23 06:16:42
【问题描述】:

当我想将我的 Go 应用程序部署到 App Engine 时,我发现我必须安装 app-engine-go。还说安装在新窗口,没有弹出窗口。

https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image-2.png

C:\go-work\src\orderFunc>gcloud app deploy
The component [app-engine-go] is required for staging this
application.

Restarting command:
  $ gcloud components install app-engine-go

Installing component in a new window.

Please re-run this command when installation is complete.
    $ gcloud app deploy

当我运行命令gcloud components install app-engine-gogcloud components update 时,它显示:

https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image.png

C:\go-work\src\orderFunc>gcloud components install app-engine-go

Restarting command:
  $ gcloud components install app-engine-go


C:\go-work\src\orderFunc>gcloud components update

Restarting command:
  $ gcloud components update


C:\go-work\src\orderFunc>gcloud components install app-engine-go

Restarting command:
  $ gcloud components install app-engine-go

我已经尝试过重新安装谷歌云SDK,但还是一样。

我希望它可以显示一些安装过程。

【问题讨论】:

  • 您是否在 Windows 上的提升命令提示符中运行此命令?这里有一个catch-22。您不需要提升来部署,但您确实需要提升来安装组件。启动提升的提示符,安装所需的组件,然后使用正常的命令提示符进行部署。

标签: google-app-engine go google-cloud-platform gcloud google-app-engine-go


【解决方案1】:

我试图为 .NET Google App Engine 应用程序部署快速入门,但遇到了同样的问题。我的问题是我需要执行 $ gcloud components install beta 才能部署我的 GAE .NET 应用程序。我得到了和你一样的行为。 PowerShell 会打印

Restarting command:
  $ gcloud components install beta

但实际上什么也没发生。在我运行命令的同一窗口中没有弹出窗口或安装进度。用于安装或更新组件的其他命令也没有工作。我只能用$ gcloud components list 列出它们,但不能安装或更新它们中的任何一个。

解决方案

我注意到,如果您以管理权限运行 PowerShell,它将在C:\Windows\system32 目录中打开一个窗口。如果您在那里执行命令,则会弹出另一个窗口并继续安装或更新 gcloud 组件。但是,如果您 cd 进入不同的目录,则行为将如本期所述。

所以要解决这个问题:

  1. 以管理员身份运行 PowerShell
  2. 如果目录与我上面描述的不同,请执行$ C:\Windows\system32,否则转到步骤3
  3. 为 gcloud 组件执行您想要的任何命令。例如$ gcloud components updategcloud components install beta 等。
  4. 应该会弹出一个窗口并继续安装或更新组件。

【讨论】:

    猜你喜欢
    • 2017-02-13
    • 1970-01-01
    • 1970-01-01
    • 2013-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-13
    相关资源
    最近更新 更多