2014-04-06 60 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。

這對我有用。祝你好運!