alpine-坑
安装uwsgi 报各种 致命错误
File "uwsgiconfig.py", line 742, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGIapk update
apk add gccIn file included from core/socket.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
compilation terminated.
In file included from core/logging.c:2:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
compilation terminated.
In file included from core/utils.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
compilation terminated.
In file included from core/protocol.c:1:0:
./uwsgi.h:165:19: fatal error: stdio.h: No such file or directory
compilation terminated.虽然成功了,但是由于有部分Python库,无法在Alpine上使用,比如opencv-python。 原因是,Alpine的libc不是GNU的,而是musl libc。 详见:Cannot install opencv-contrib-python from Alpine Linux · Issue #75 · skvark/opencv-python。
所以放弃使用alpine
alpine最后更新于