After a complete reinstall of Ubuntu 10.04 on my laptop I had to recreate my development environment. Part of that included installing some extensions from PECL. When trying to install apc-3.1.2 I got the following error:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
I decided to search the package archives for the pcre.h file. To do this I used a command called apt-file (apt-get install apt-file and apt-file update if you don’t have it installed).
apt-file search -x "/pcre.h$"
The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:
- kannel-dev: /usr/include/kannel/gwlib/pcre.h
- libajax6-dev: /usr/include/ajax/pcre.h
- libpcre3-dev: /usr/include/pcre.h
The last one is the one I want:
apt-get install libpcre3-dev
Now that I finally have this package I can run pear install pecl/apc-3.1.2 to install APC.