dr5648 2018-04-04 20:34
浏览 55
已采纳

错误响应:[2]使用GCP构建失败-Golang

I'm trying deploy my server using Golang into Google Cloud Platform
I run gcloud app deploy cmd/web/app.yaml And was return Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
Into the logs was print this:

Starting Step #0
Step #0: Pulling image: gcr.io/gcp-runtimes/go1-builder@sha256:[...]
Step #0: sha256:[...]: Pulling from gcp-runtimes/go1-builder
Step #0: Digest: sha256:[...]
Step #0: Status: Downloaded newer image for gcr.io/gcp-runtimes/go1-builder@sha256:[...]
Step #0: main.go:8:2: cannot find package "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql" in any of:
Step #0:    /usr/local/go/src/github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql (from $GOROOT)
Step #0:    /workspace/_gopath/src/github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql (from $GOPATH)
Step #0: routes.go:5:2: cannot find package "github.com/bmizerany/pat" in any of:
Step #0:    /usr/local/go/src/github.com/bmizerany/pat (from $GOROOT)
Step #0:    /workspace/_gopath/src/github.com/bmizerany/pat (from $GOPATH)
Step #0: main.go:7:2: cannot find package "github.com/go-sql-driver/mysql" in any of:
Step #0:    /usr/local/go/src/github.com/go-sql-driver/mysql (from $GOROOT)
Step #0:    /workspace/_gopath/src/github.com/go-sql-driver/mysql (from $GOPATH)
Step #0: middleware.go:6:2: cannot find package "github.com/justinas/nosurf" in any of:
Step #0:    /usr/local/go/src/github.com/justinas/nosurf (from $GOROOT)
Step #0:    /workspace/_gopath/src/github.com/justinas/nosurf (from $GOPATH)
Step #0: handlers.go:7:2: cannot find package "myProject/pkg/forms" in any of:
Step #0:    /usr/local/go/src/myProject/pkg/forms (from $GOROOT)
Step #0:    /workspace/_gopath/src/myProject/pkg/forms (from $GOPATH)
Step #0: app.go:4:2: cannot find package "myProject/pkg/models" in any of:
Step #0:    /usr/local/go/src/myProject/pkg/models (from $GOROOT)
Step #0:    /workspace/_gopath/src/myProject/pkg/models (from $GOPATH)
Finished Step #0
ERROR

My gcloud configuration is correct because I have a connection to Google SQL and I save the data. I have the code in a Compute Engine, but I try to run gcloud app deploy cmd / web / app.yaml on my pc

  • 写回答

2条回答 默认 最新

  • dongqian2021 2018-04-09 09:13
    关注

    The error was in app.yaml i don't have much idea why but i just delete into app.yaml the line api_version: go1

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器