sudo pecl install apc returns error

21,355

Solution 1

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

Solution 2

sudo apt-get install libpcre3-dev is the answer.

So to be able to install pecl [install extension]

the following packages are required:

sudo apt-get install php5-pear php5-dev libpcre3-dev

Solution 3

What version of PHP?

For a while, some months ago, I had trouble installing APC, and could only make it work with pecl install apc-beta

If you're not dealing with a production system, you might try that.

Solution 4

You seem to be missing the development version of PHP5. On Ubuntu you can install it using:

sudo aptitude install php5-dev

Solution 5

Have you install a PHP extension via PECL before?

Does the file /usr/include/php5/ext/pcre/php_pcre.h actually exist?

You could get this error because of the following

  1. Incorrect permissions
  2. PECL directory configuration is incorrect.
Share:
21,355
Nicolas de Fontenay
Author by

Nicolas de Fontenay

I'm born in Mauritius, I studied in France, I worked in Asia and now live and work in San Diego. I'm an oracle and SQL Server DBA with a focus on server tuning, sql tuning and server monitoring. I work daily with a 3 node RAC on oracle 12c / Flex ASM with 2 databases. A number of Oracle 11g instances A number of SQL Server databases in different versions. I'm currently working on my Oracle 12c certifications.

Updated on July 09, 2022

Comments

  • Nicolas de Fontenay
    Nicolas de Fontenay almost 2 years

    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?

  • Louis Nel
    Louis Nel almost 13 years
    PCRE is required but the docs still say: "No external libraries are needed to build this extension."
  • Citricguy
    Citricguy almost 11 years
    sudo apt-get install build-essential may help with the external libraries issue.
  • Ryre
    Ryre almost 11 years
    I received this error after installing php5-dev, unfortunately (Ubuntu 12.04).