Swoole 当使用参数 --enable-async-redis 时编译报错

/tmp/pear/temp/swoole/swoole_redis.c:20:29: fatal error: hiredis/hiredis.h: No such file or directory

启用 Swoole 的 async-redis 扩展需要安装 hiredis,hiredis 需要 redis

安装 Redis

cd ~
wget http://download.redis.io/releases/redis-5.0.0.tar.gz
tar xzf redis-5.0.0.tar.gz
cd redis-5.0.0
make

安装 hiredis

cd ~
wget https://github.com/redis/hiredis/archive/v0.13.3.zip
unzip v0.13.3.zip
cd hiredis-0.13.3
make -j
sudo make install
sudo ldconfig
https://blog.liuguofeng.com/archives/3666

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注