Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
zer0xtgs opened this issue May 5, 2017 · 6 comments
Closed

Comments

@zer0xtgs
Copy link

zer0xtgs commented May 5, 2017

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 ?

@mattn
Copy link
Owner

mattn commented May 8, 2017

Google Appengine doesn't accept executing external command like gcc AFAIK.

@zer0xtgs
Copy link
Author

zer0xtgs commented May 8, 2017

I've heard if I compile sqlite3 (go install github.com/mattn/go-sqlite3), then I do not need GCC anymore. So basically if compile sqlite3, then upload it to Google Cloud Platform, It might works?

@mattn
Copy link
Owner

mattn commented May 8, 2017

If the GCP is same as OS that you compiled go-sqlite3, and go-sqlite3.a is located at GOPATH/pkg/..., it maybe work. I'm not sure.

@zer0xtgs
Copy link
Author

zer0xtgs commented May 8, 2017

I've compiled go-sqlite3 by GCP's GCC, but it still has the same error. Why does go-sqlite3 again try call GCC, then I try deploy the app?
mattn - editor 2017-05-08 13-28-15

home - todo-hntu 2017-05-08 13-32-47

@mattn
Copy link
Owner

mattn commented May 9, 2017

Sorry, I don't know.

@gjrtimmer
Copy link
Collaborator

gcc not support on GCP you should upload the final binary.

gjrtimmer added a commit to gjrtimmer/go-sqlite3 that referenced this issue May 26, 2018
Compile Section Closes mattn#175
Compile Section Closes mattn#201
Compile Section Closes mattn#206
Compile Section Closes mattn#404
Compile Section Closes mattn#217
Compile Section Closes mattn#224
Compile Section Closes mattn#234
Compile Section Closes mattn#242
Feature table Closes mattn#255
Description Section Closes mattn#232
Golang:1.6 not supported Closes mattn#272
Golang:1.5 not supported + compilation section Closes mattn#283
usleep Implemented Closes mattn#285
FAQ Section Closes mattn#289
Compile Section closes mattn#295
FAQ Section Closes mattn#305
PR339 Closes mattn#318 mattn#321
Compilation Section Closes mattn#341
PR407 Closes mattn#364
Feature `sqlite_vtable` Closes mattn#393
Compile Section Closes mattn#416
sqlite_trace feature Closes mattn#433
Compilation Section Closes mattn#435
Compilation Section Closes mattn#443
Golang:1.6 Not Supported Closes mattn#445
Compilation Section Closes mattn#451
Compilation Section Closes mattn#467
Compilation Section Closes mattn#491
Compilation Section Closes mattn#495
Compilation Section Closes mattn#505
Compilation Section Closes mattn#557
Compilation Section Closes mattn#560
@mattn mattn closed this as completed in c9394b1 May 27, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants