sudo pecl install apc returns error

Nicolas de Fontenay picture Nicolas de Fontenay · Jan 18, 2011 · Viewed 21.2k times · Source

I run the command: sudo pecl install apc

The file gets downloaded, the configuration succeeds, then make is launched and I get the following error.

/usr/include/php5/ext/pcre/php_pcre.h:29: fatal error: pcre.h: No such file or directory

Is there a way to fix it?

Answer

Chris Henry picture Chris Henry · Jan 18, 2011

PCRE is a dependency for installing APC. You can install it pretty quick with

yum install pcre-devel or apt-get install libpcre3-dev

once it's installed, re-run

sudo pecl install apc