简体   繁体   English

PHP Phalcon安装错误

[英]PHP Phalcon installation error

I was trying to install phalcon in my MAC system but getting this error , Please tell me how can I solve it? 我试图在我的MAC系统中安装phalcon,但出现此错误,请告诉我如何解决?

I have run these command 我已经运行了这些命令

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

and it show me error: 它告诉我错误:

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 

Anyone has solution for it ?? 任何人都有解决方案吗?

Have you installed PCRE? 您安装了PCRE吗? http://mac-dev-env.patrickbougie.com/pcre/ gives an excellent article on how to do that. http://mac-dev-env.patrickbougie.com/pcre/提供了有关如何执行此操作的出色文章。

Then in your /usr/include/php/ext/pcre/php_pcre.h file, edit the line that includes pcre.h to include /path/to/pcre.h in your pcre folder. 然后在/usr/include/php/ext/pcre/php_pcre.h文件中,编辑包含pcre.h的行,以在pcre文件夹中包含/path/to/pcre.h。

That worked for me. 那对我有用。 Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM