Skip to content

exec: "gcc": executable file not found in $PATH (Google Cloud Platform) #416

Closed
@zer0xtgs

Description

@zer0xtgs

I'm trying to deploy my web-app to Google Cloud Platform, and I got an error while deploying. I understand that last package (go-sqlite3) needs gcc compiler, and Google Cloud WM has it:

$which gcc
/usr/bin/gcc

but it still doesn't work

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

echo $PATH output:
zer0xtgs@todo-hntu:~$ echo $PATH /google/google-cloud-sdk/bin:/usr/local/nvm/versions/node/v6‌​.9.2/bin:/home/zer0x‌​tgs/gopath/bin:/goog‌​le/gopath/bin:/usr/l‌​ocal/go/bin:/gradle-‌​2.12/bin:/apache-mav‌​en-3.3.9/bin:/google‌​/google-cloud-sdk/bi‌​n:/usr/local/sbin:/u‌​sr/local/bin:/usr/sb‌​in:/usr/bin:/sbin:/b‌​in:/google/go_appeng‌​ine:/google/google_a‌​ppengine

also, I have added this to Google Cloud Shell profile:
PATH=/usr/bin:$PATH
and tried
go get github.com/mattn/go-sqlite3 and go install github.com/mattn/go-sqlite3

but this doesn't help, after I'm trying to deploy app, same error.

Is it Google Cloud Platform bug or something with go-sqlite3 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions