APC(主干)使用PHP 5.4在CentOS上安装

时间:2012-07-03 23:39:26

标签: php compilation centos apc

有人在php 5.4上成功安装了APC吗?根据我在StackOverflow上找到的另一个线程,似乎可以使用最新的trunk

我抓住了行李箱phpize./configure,但当我尝试运行make时,我收到以下错误:

>/bin/sh /root/trunk/libtool --mode=compile cc  -I. -I/root/trunk -DPHP_ATOM_INC -I/root/trunk/include -I/root/trunk/main -I/root/trunk -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 /root/trunk/apc.c -o apc.lo   
libtool: compile:  cc -I. -I/root/trunk -DPHP_ATOM_INC -I/root/trunk/include -I/root/trunk/main -I/root/trunk -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 /root/trunk/apc.c  -fPIC -DPIC -o .libs/apc.o    
In file included from /root/trunk/apc.c:44:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory    
In file included from /root/trunk/apc.c:44:
/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’
/root/trunk/apc.c: In function ‘apc_search_paths’:
/root/trunk/apc.c:361: warning: assignment discards qualifiers from pointer target type
/root/trunk/apc.c: At top level:
/root/trunk/apc.c:394: error: expected specifier-qualifier-list before ‘pcre’
/root/trunk/apc.c: In function ‘apc_regex_compile_array’:
/root/trunk/apc.c:455: error: ‘apc_regex’ has no member named ‘preg’
/root/trunk/apc.c:455: error: ‘apc_regex’ has no member named ‘preg’
/root/trunk/apc.c:456: error: ‘apc_regex’ has no member named ‘nreg’
/root/trunk/apc.c:456: error: ‘apc_regex’ has no member named ‘nreg’
/root/trunk/apc.c: In function ‘apc_regex_match_array’:
/root/trunk/apc.c:488: error: ‘apc_regex’ has no member named ‘preg’
/root/trunk/apc.c:488: error: ‘apc_regex’ has no member named ‘preg’
/root/trunk/apc.c:489: error: ‘apc_regex’ has no member named ‘nreg’
/root/trunk/apc.c:489: error: ‘apc_regex’ has no member named ‘nreg’
make: *** [apc.lo] Error 1

1 个答案:

答案 0 :(得分:2)

您需要安装PCRE的开发标题。

如果您使用Centos或Fedora(或REPL或......),您可以通过以下方式获取它们:

  • yum install pcre-devel

如果您使用的是Debian或Ubuntu,可以使用以下命令获取:

  • apt-get install libpcre3-dev