Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac PHP7 Pecl Oauth : Couldn't find pcre.h

i passed my day to fix this error and i think it's time to ask a question!

so i got this error when i try to install the Oauth PHP module with sudo pecl install oauth

configure: error: Couldn't find pcre.h, try installing the libpcre development/headers package

I've installed pcre with Brew cause i'm on Mac Os 10.11.6

Pcre is correctly installed :

iLolo:oauth-2.0.2 do_f$ brew install pcre Warning: pcre-8.39 already installed

PHP Version :

iLolo:oauth-2.0.2 do_f$ php -v PHP 7.0.8 (cli) (built: Jun 26 2016 12:30:44) ( NTS )

Here there is the locate pcre.h command

iLolo:~ do_f$ locate pcre.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/php/ext/pcre/php_pcre.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include/php/ext/pcre/php_pcre.h
/usr/local/Cellar/pcre/8.39/include/pcre.h
/usr/local/Cellar/pcre/8.39/share/doc/pcre/html/pcre.html
/usr/local/include/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/ext/pcre/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/ext/pcre/pcrelib/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/ext/pcre/pcrelib/pcre.h.back
/usr/local/php5-7.0.8-20160626-123411/include/php/ext/pcre/php_pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/ext/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/include/pcre.h
/usr/local/php5-7.0.8-20160626-123411/include/php/pcre.h
iLolo:~ do_f$ 
like image 465
florian-do Avatar asked Jan 26 '26 16:01

florian-do


1 Answers

Install pcre:

brew install pcre

Then run again.

like image 134
Jeremy Avatar answered Jan 29 '26 07:01

Jeremy