Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such file or directory "limits.h" when installing Pillow on Alpine Linux

Alpine Linux uses musl libc. You probably need to install musl-dev.


@zakaria answer is correct, but if you stumble upon

fatal error: linux/limits.h: No such file or directory

then you need the package linux-headers (notice the prefix linux before limits.h

apk add linux-headers

limits.h is located in libc-dev:

apk add libc-dev

I had a very similar problem with installing the Python library regex in Docker using the python:3.6-alpine image, for Alpine Linux >= 3.3.

pip install regex

I had to add gcc and musl-dev packages:

apk --no-cache add gcc musl-dev