简体   繁体   English

sudo pecl在os x lion上安装apc错误

[英]sudo pecl install apc error on os x lion

I tried installing APC with pecl on OS X Lion ( sudo pecl install apc ) and it complained about a missing pcre.h file: 我尝试在OS X Lion上使用pecl安装APC( sudo pecl install apc ),它抱怨缺少pcre.h文件:

In file included from /private/tmp/pear/temp/APC/apc.c:44:
/usr/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file not found
#include "pcre.h"

So I used MacPorts to install the pcre package ( sudo port install pcre ) but it still complains. 所以我用MacPorts安装了pcre包( sudo port install pcre ),但是它仍然抱怨。 How can I fix this? 我怎样才能解决这个问题?

I think this is because MacPorts installs the header files in a different location from where pecl expects them. 我认为这是因为MacPorts将头文件安装在与pecl期望的位置不同的位置。

To fix this error, I symlinked pcre.h to /usr/include : 要解决此错误,我将pcre.h/usr/include

sudo ln -s /opt/local/include/pcre.h /usr/include/

When running sudo pecl install apc it compiled just fine. 当运行sudo pecl install apc它编译就好了。

“ brew install pcre”对我有用。

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

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