2014-02-26 113 views
2

我在我的Mac OSX Maverics上安裝phpredis時遇到一些問題。使用pecl在osx上安裝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

看起來像你的PHP是不可用的環境變量路徑或安裝從一些默認位置選擇PHP。