andy@AndyMacBookPro:/usr/local/src/pcre$ brew install pcre
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pcre-8.35.
######################################################################## 100.0%
==> Pouring pcre-8.35.mavericks.bottle.tar.gz
/usr/local/Cellar/pcre/8.35: 146 files, 5.8M
现在寻找本机的pcre.h是这样的:
复制代码 代码如下:
andy@AndyMacBookPro:/usr/include/php/ext/pcre$ sudo find / -name pcre.h
Password:
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/Users/andy/Downloads/php-5.4.30/ext/pcre/pcrelib/pcre.h
/usr/local/Cellar/pcre/8.35/include/pcre.h
/usr/local/Cellar/php54/5.4.30/include/php/ext/pcre/pcrelib/pcre.h
/usr/local/include/pcre.h
andy@AndyMacBookPro:/usr/include/php/ext/pcre$
之后编译,成功,但是有几个warning,数了数是6个:
复制代码 代码如下: