I was able to resolve this issue. Although php_pcre.h file was located in the include path, pcre.h wasn't.
I ran the install with the following command (setting the path for pcre header files) and that did the trick:
sudo C_INCLUDE_PATH=/usr/local/opt/pcre pecl install mongodb
Phew!
manpreet
Best Answer
2 years ago
I am having some issues installing mongodb driver for PHP on MacOS. The PHP I have on my laptop came with MacOS and the version is:
I have followed instructions on disabling csrutil and installed pear with the following command:
And then I am trying to install mongodb with the following command:
The problem now is that the compilation fails with "include file not found" error. I have Xcode development and command line tools installed and have looked all over for answers but I can't seem to crack this error.
While installing the include paths are found by pecl (as shown below) but when it comes to compiling it is erroring out as below:
Following a suggestion on the web I even included the path to header files with C_INCLUDE_PATH but doesn't work.
Can someone please throw some light on this? I am at my wit's end on this :)