問題描述:
在編譯安裝Yaf框架時,在make的是出現如下錯誤提示:
In file included from /root/yaf-2.1.2/yaf_router.c:28:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /root/yaf-2.1.2/yaf_router.c:28:
/usr/include/php/ext/pcre/php_pcre.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:52: error: expected specifier-qualifier-list before ‘pcre’
make: *** [yaf_router.lo] 錯誤 1
解決辦法:
# yum install pcre-devel
安裝 pcre-devel即可解決了。