我在Mac OSX Maverics上安装phpredis
时遇到了一些问题。
我确实安装并运行了redis server
。我使用sudo pecl install redis
来安装phpredis。
现在,当我这样做时,出现了这个问题:
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/redis/redis.c -o redis.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/redis/redis.c -fno-common -DPIC -o .libs/redis.o
In file included from /private/tmp/pear/temp/redis/redis.c:27:
/private/tmp/pear/temp/redis/common.h:1:10: fatal error: 'php.h' file not found
#include "php.h"
^
1 error generated.
make: *** [redis.lo] Error 1
ERROR: `make' failed
这是怎么回事?由于缺少php.h文件,make之类的接缝失败了。但为什么会这样,我该如何解决这个问题?
答案 0 :(得分:0)
看起来你的php在环境变量路径中不可用,或者安装是从某个默认位置选择php。