Add C compiler (gcc) as a build dependency
dvt
TRIALOP
a year ago
I need the gcc compiler to build my Go binary, is there a way to add this dependency?
The error I get when building the Go binary:C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
dvt
TRIALOP
a year ago
As per https://help.railway.app/questions/i-have-this-issue-when-building-go-app-w-dfc7dcbc, I am using `apt-get update && apt-get install -y gcc && CGO_ENABLED=1 go build .` as the build command, and it works.
I tried setting a service variable, as was suggested in that thread, like `CGO_ENABLED` to `1`, but that did not work.