2014-04-06 100 views
0

我试图在我的MAC系统中安装phalcon但出现此错误,请告诉我该如何解决它?PHP Phalcon安装错误

我已经运行这些命令

git clone --depth=1 git://github.com/phalcon/cphalcon.git 
cd cphalcon/build 
sudo ./install 

,它告诉我的错误:

creating libtool 
appending configuration tag "CXX" to libtool 
configure: creating ./config.status 
config.status: creating config.h 
/bin/sh /Users/dladdha/test/cphalcon/build/64bits/libtool --mode=compile gcc -I. -I/Users/dladdha/test/cphalcon/build/64bits -DPHP_ATOM_INC -I/Users/dladdha/test/cphalcon/build/64bits/include -I/Users/dladdha/test/cphalcon/build/64bits/main -I/Users/dladdha/test/cphalcon/build/64bits -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 -DPHALCON_RELEASE -DHAVE_CONFIG_H -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /Users/dladdha/test/cphalcon/build/64bits/phalcon.c -o phalcon.lo 
mkdir .libs 
gcc -I. -I/Users/dladdha/test/cphalcon/build/64bits -DPHP_ATOM_INC -I/Users/dladdha/test/cphalcon/build/64bits/include -I/Users/dladdha/test/cphalcon/build/64bits/main -I/Users/dladdha/test/cphalcon/build/64bits -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 -DPHALCON_RELEASE -DHAVE_CONFIG_H -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /Users/dladdha/test/cphalcon/build/64bits/phalcon.c -fno-common -DPIC -o .libs/phalcon.o 
In file included from /usr/include/php/ext/spl/spl_iterators.h:27, 
       from /Users/dladdha/test/cphalcon/build/64bits/phalcon.c:204: 
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory 
In file included from /usr/include/php/ext/spl/spl_iterators.h:27, 
       from /Users/dladdha/test/cphalcon/build/64bits/phalcon.c:204: 
/usr/include/php/ext/pcre/php_pcre.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
/usr/include/php/ext/pcre/php_pcre.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
/usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before ‘pcre’ 
make: *** [phalcon.lo] Error 1 

任何人有它的解决方案?

+0

看一看这个 http://stackoverflow.com/questions/22555561/error-building-fatal-error-pcre-h-no-such-file-or-directory/22559967 –

回答

4

您是否安装了PCRE? http://mac-dev-env.patrickbougie.com/pcre/给出了一篇关于如何做到这一点的优秀文章。

然后,在您的/usr/include/php/ext/pcre/php_pcre.h文件中,编辑包含pcre.h的行以在您的pcre文件夹中包含/path/to/pcre.h。

这对我有用。祝你好运!