Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

# github.com/gen2brain/go-fitz | /go/pkg/mod/github.com/gen2brain/go-fitz@v1.18.0/fitz.go:8:10: fatal error: mupdf/fitz.h: No such file or directory #41

Closed
andysteve opened this issue Dec 31, 2021 · 1 comment

Comments

@andysteve
Copy link

andysteve commented Dec 31, 2021

Am new to golang, and I need to generate a thumbnail from pdf when I upload it. am using go-fitz library with docker and golang.

But am getting challenged on building docker image including ImageMagick

Docker set up


FROM golang:alpine AS build
RUN apk --no-cache add gcc g++ make git

WORKDIR /go/src/app

COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .

RUN GOOS=linux go build -tags extlib -ldflags="-s -w" -o ./bin/web-app ./main.go

FROM alpine:3.13
RUN apk --no-cache add ca-certificates
WORKDIR /usr/bin
COPY --from=build /go/src/app/bin /go/bin
EXPOSE 2053
ENTRYPOINT /go/bin/web-app --port 2053


image

github.com/gen2brain/go-fitz

/go/pkg/mod/github.com/gen2brain/go-fitz@v1.18.0/fitz.go:8:10: fatal error: mupdf/fitz.h: No such file or directory
8 | #include <mupdf/fitz.h>
| ^~~~~~~~~~~~~~
compilation terminated.


Thanks

@gen2brain
Copy link
Owner

You are using extlib tag and you don't install the external library. See #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants