bimg
bimg copied to clipboard
# pkg-config --cflags -- vips vips vips vips, pkg-config: exec: "pkg-config": executable file not found in $PATH
Hello Am new to golang, working on a project to take a thumbnail from the first page of a pdf am using bimg package to help do the task but am going an error below when i build my docker image
Docker Image
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 -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 2022 ENTRYPOINT /go/bin/web-app --port 2022
pkg-config --cflags -- vips vips vips vips
pkg-config: exec: "pkg-config": executable file not found in $PATH
Kindly help with this error Thanks
You should add vips-dev package in RUN command.
RUN apk add --update --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing --repository http://dl-3.alpinelinux.org/alpine/edge/main vips-dev vips-poppler
RUN apk add --no-cache poppler-dev
You should add dependency in Dockerfile, and add poppler to support pdf format
you should export "export CGO_CFLAGS_ALLOW=-Xpreprocessor" when you use golang
apk add gcc g++ vips-dev vips-poppler pkgconf
export PKG_CONFIG_PATH=/usr/bin/pkgconf
hello, I have the same problem: I run : go run . on the terminal... how can I install vips? or I should run command: export CGO_CFLAGS_ALLOW=-Xpreprocessor I am lost. thanks 4 the help
hello, I have the same problem:
I run : go run . on the terminal...
how can I install vips? or I should run command: export CGO_CFLAGS_ALLOW=-Xpreprocessor
I am lost. thanks 4 the help
Try RUN export CGO_CFLAGS_ALLOW=".*"
I got this:
export : El término 'export' no se reconoce como nombre de un cmdlet, función, archivo de script o
programa ejecutable. Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso,
compruebe que dicha ruta es correcta e inténtelo de nuevo.
En línea: 1 Carácter: 1
- export CGO_CFLAGS_ALLOW=".*"
-
+ CategoryInfo : ObjectNotFound: (export:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException