如何解决以下Google Cloud Platform部署错误? [错误2]

时间:2017-05-04 17:12:29

标签: gcc go google-cloud-platform

我正在尝试将我的网络应用部署到Google Cloud Platform,部署时出现错误。我知道最后一个包(go-sqlite3)需要gcc编译器,而Google Cloud WM则需要它:

$which gcc
/usr/bin/gcc

但它不会工作

Step 3 : RUN go-wrapper install -tags appenginevm
 ---> Running in b0f03024342d
+ exec go install -v -tags appenginevm
github.com/mattn/go-colorable
github.com/mattn/go-isatty
github.com/labstack/gommon/color
github.com/valyala/fasttemplate/vendor/github.com/valyala/bytebufferpool
github.com/valyala/fasttemplate
github.com/labstack/gommon/log
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
github.com/labstack/echo
golang.org/x/net/context
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in $PATH
The command '/bin/sh -c go-wrapper install -tags appenginevm' returned a non-zero code: 2
ERROR
ERROR: build step "gcr.io/cloud-builders/docker@sha256:926dc1a14e6f7eb5b3462b5c1d491aa6c73090291167ac2bf181c026b05f19da" failed: exit status 2

1 个答案:

答案 0 :(得分:0)

您必须通过在shell上执行以下命令来使路径正确。

 PATH=/usr/bin:$PATH