I am trying to install a PHP extension mongodb for non-default php binary location. I am using PECL:
sudo pecl install mongodb
and after long logs I get this
/tmp/pear/temp/mongodb/src/bson.c:29:17: fatal error: php.h: No such file or directory
#include <php.h>
^
compilation terminated.
Makefile:338: recipe for target 'src/bson.lo' failed
make: *** [src/bson.lo] Error 1
ERROR: `make' failed
How can I get rid of this?
The same solution as here: Attempting to install OAuth on Ubuntu but getting errors
Install the PCRE Library (Perl 5 Compatible Regular Expression Library) with:
# sudo apt-get update
# sudo apt-get install libpcre3 libpcre3-dev