0

I try to install pbc library which have gmp as dependence. Dockerfile:

FROM golang:1.9.6-alpine3.7

RUN mkdir -p /go/src/app

WORKDIR /go/src/app

COPY . /go/src/app

RUN apk add --update git gcc build-base flex bison gmp

RUN wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz && \
    tar -xvf pbc-0.5.14.tar.gz && \
    cd pbc-0.5.14 && \
    ./configure --prefix=$HOME/.local && \
    make && make install

RUN rm pbc-0.5.14.tar.gz && rm -rf pbc-0.5.14 

RUN go-wrapper download

RUN go-wrapper install

CMD ["go-wrapper", "run", "-web"]

EXPOSE 8000

However when I run it I get such an error during pbc installation:

gmp library not found
add its path to LDFLAGS
see ./configure --help

Here I found that i should add export: How to add a path to LDFLAGS

Note that I add gmp to dependencies, but pbg dont see it

How should I do it throw docker?

inyutin
  • 406
  • 3
  • 9
  • Possible duplicate of [Add C library to docker](https://stackoverflow.com/questions/52508498/add-c-library-to-docker) – David Maze Sep 26 '18 at 10:36
  • This is exactly the same as the question you posted yesterday: the pbc library depends on the gmp library and you need to install that too. (That's pretty common and you might be able to use a distribution package manager to add it and its development files.) – David Maze Sep 26 '18 at 10:37
  • You can see that I add gmp through apk. Howerver I still get error while installing pbc – inyutin Sep 26 '18 at 10:46
  • Changing to Ubuntu env. solve this problem – inyutin Sep 27 '18 at 17:41

0 Answers0