小编Uji*_*jin的帖子

dockerizing 期间无法在 alpine 上安装 pycosat

我正在尝试 dockerize django 应用程序,并且我使用alpine:edge作为基本图像。并且pycosat安装失败并出现错误

In file included from pycosat.c:19:
picosat.c:8150:10: fatal error: sys/unistd.h: No such file or directory
 #include <sys/unistd.h>
          ^~~~~~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

这是我的 Dockerfile 的样子

FROM alpine:edge
    ENV PYTHONBUFFERED 1

    RUN apk update && \
        apk add --virtual build-deps gcc python3-dev musl-dev \
        libffi-dev openssl-dev python3 py3-zmq build-base libzmq zeromq-dev \
        curl g++ make zlib-dev linux-headers openssl ca-certificates libevent-dev

    RUN pip3 install …
Run Code Online (Sandbox Code Playgroud)

python-3.x docker docker-compose alpine-linux

3
推荐指数
1
解决办法
957
查看次数

标签 统计

alpine-linux ×1

docker ×1

docker-compose ×1

python-3.x ×1