我尝试安装以gmp为依赖项的pbc库。 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
但是,当我运行它时,在pbc安装过程中会出现这样的错误:
gmp library not found
add its path to LDFLAGS
see ./configure --help
在这里,我发现我应该添加导出: How to add a path to LDFLAGS
请注意,我将gmp添加到依赖项中,但pbg没有看到它
我应该如何扔码头工人?
答案 0 :(得分:-1)
更改为Ubuntu env。解决这个问题