h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Uber H3 GCC Issue when building in Go

Open nsehgal opened this issue 4 years ago • 2 comments


FROM golang:alpine AS build-env

WORKDIR /appname

COPY go.mod . COPY go.sum .

RUN go mod download

COPY . .

RUN go get -d -v ./... RUN go build -o appname

FROM golang:alpine

WORKDIR /app

COPY --from=build-env /appname/ ./

EXPOSE 8100

ENTRYPOINT ["./appname"]


Getting this error on build with above docker file. How to build uber h3 go lib with go mod?

github.com/uber/h3-go exec: "gcc": executable file not found in $PATH

Thanks for the help.

nsehgal avatar Jun 01 '20 22:06 nsehgal

It sounds like GCC is not installed in your Docker environment. I haven't tried these steps myself, but could you try what Alpine recommends for installing GCC? https://wiki.alpinelinux.org/wiki/GCC run:apk add build-base

isaacbrodsky avatar Jun 04 '20 23:06 isaacbrodsky

Thanks @isaacbrodsky works for me

oneEyedSunday avatar Jan 23 '21 14:01 oneEyedSunday