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条)

报告相同问题?

悬赏问题

  • ¥30 Matlab打开默认名称带有/的光谱数据
  • ¥50 easyExcel模板 动态单元格合并列
  • ¥15 res.rows如何取值使用
  • ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
  • ¥15 CSP算法实现EEG特征提取,哪一步错了?
  • ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
  • ¥15 vue3前端取消收藏的不会引用collectId
  • ¥15 delphi7 HMAC_SHA256方式加密
  • ¥15 关于#qt#的问题:我想实现qcustomplot完成坐标轴
  • ¥15 下列c语言代码为何输出了多余的空格