Makefile 使用pecl在osx上安装phpredis

Makefile 使用pecl在osx上安装phpredis,makefile,phpredis,Makefile,Phpredis,在Mac OSX Maverics上安装phpredis时遇到一些问题 我确实安装并运行了redis服务器。我使用sudopecl安装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

在Mac OSX Maverics上安装phpredis时遇到一些问题

我确实安装并运行了
redis服务器
。我使用
sudopecl安装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等seams失败。但这是为什么?我如何解决这个问题?

看起来您的php在环境变量路径中不可用,或者安装程序正在从某个默认位置选择php