Alpine 安装 Swoole 报错

  • 内容
  • 评论
  • 相关

pecl install swoole-1.9.22

/src/os/linux_aio.c  -fPIC -DPIC -o src/os/.libs/linux_aio.o
/tmp/pear/temp/swoole/src/os/linux_aio.c:23:27: fatal error: linux/aio_abi.h: No such file or directory
  #include <linux/aio_abi.h>
                            ^
compilation terminated.
make: *** [Makefile:338: src/os/linux_aio.lo] Error 1
ERROR: `make' failed

image

~ # cat /proc/version
Linux version 4.9.125-linuxkit (root@659b6d51c354) (gcc version 6.4.0 (Alpine 6.4.0) ) #1 SMP Fri Sep 7 08:20:28 UTC 2018

解决办法:

apk add linux-headers

image

image

image