如何修复';PHP';在Mac OS X(10.9.4)中是否使用make?

如何修复';PHP';在Mac OS X(10.9.4)中是否使用make?,php,macos,postgresql,makefile,Php,Macos,Postgresql,Makefile,我正在OS X Mavericks(10.9.4)上为PHP添加postgres支持 按照[blog]()中的步骤操作。。。在错误和之间修复,直到“make”为止 在执行“make”时,我得到以下错误。 ------错误------ users mbp:pdo_pgsql RK$pwd /usr/include/php/ext/pdo_pgsql 用户mbp:pdo_pgsql RK$make /bin/sh/usr/include/php/ext/pdo_pgsql/libtool--mode

我正在OS X Mavericks(10.9.4)上为PHP添加postgres支持

按照[blog]()中的步骤操作。。。在错误和之间修复,直到“make”为止

在执行“make”时,我得到以下错误。 ------错误------

users mbp:pdo_pgsql RK$pwd
/usr/include/php/ext/pdo_pgsql
用户mbp:pdo_pgsql RK$make
/bin/sh/usr/include/php/ext/pdo_pgsql/libtool--mode=编译cc-I/usr/include/php-I-I/usr/include/php/pdo_pgsql-DPHP_ATOM_INC-I/usr/include/php/ext/pdo_pgsql/include-I/usr/include/php/pdo_pgsql/main-I/usr/include/php/ext/pdo_pgsql-I/pgsql-I/usr-I/include/usr/php/html-I/usr/include/php/Zend-I/usr/include/php/ext-I/usr/include/php/ext/date/lib-I/Applications/Postgres.app/Contents/Versions/9.3/include-DHAVE_CONFIG_H-g-O2-c/usr/include/php/ext/pdo_pgsql/pdo_pgsql.c-o pdo_pgsql.lo
cc-I/usr/include/php/ext-I-I/usr/include/php/ext/pdo_pgsql-DPHP_ATOM_INC-I/usr/include/php/ext/pdo_pgsql/include-I/usr/include/php/ext/pdo_pgsql/main-I/usr/include/php/include/php/main-I/usr/include/php/TSRM-I/usr/include/php/Zend-I/usr/include/php/index/php/ext/usr/php/include/index/php/usr/php/ext/usr/include/usr/index/index/php/index/index/index/index/html-I/Applications/Postgres.app/Contents/Versions/9.3/include-DHAVE_CONFIG_H-g-O2-c/usr/include/php/ext/pdo_pgsql/pdo_pgsql.c-fno common-DPIC-o.libs/pdo_pgsql.o
在/usr/include/php/ext/pdo_pgsql/pdo_pgsql.c:25中包含的文件中:
在/usr/include/php/main/php.h:34中包含的文件中:
/usr/include/php/Zend/Zend.h:51:11:致命错误:未找到“Zend_config.h”文件
#包括
^
生成1个错误。
make:**[pdo_pgsql.lo]错误1
用户mbp:pdo_pgsql RK$
------错误------}
但是,我可以在以下目录中找到这些文件:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/zend_config.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/zend_config.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/Zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/Zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/Zend_config.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/Zend_config.h 在[post]()下看到了类似的问题。 -这表明:

如果您得到以下/Applications/MAMP/bin/php/php5.4.4/include/php/Zend/Zend.h:51:11:致命错误:“未找到Zend_config.h”文件,请确保配置php源代码。i、 e.在您复制所有文件的目录中运行。/configure–greg Jan 19'13 2:41

虽然我已经运行了./configure,但是上面的错误仍然发生

能帮我理解我错过了什么吗


提前谢谢

所以我找到了一个适合我的解决方案

到你的终端去打字

“sudo cp-r/usr/include/php/Applications/MAMP/bin/php/php5.x.x/include/”

用您正在使用的php版本替换粗体字母


然后运行make命令,似乎
zend.h
不在
/usr/include/php/zend/
中,而是在
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/zend/
中。实际上,“zend.h”找不到“zend_config.h”。。。zend_config.h确实不在:/usr/include/php/zend下。相反,我看到了以下两个文件,在:/usr/include/php/Zend Zend_config.w32.h Zend_config.nw.h下-我应该手动将Zend_config.h复制到上面的位置吗?您可以试试,或者使用它们所在的路径;这些文件可能也依赖于其他文件。这救了我!默认php源缺少所有这些标题。谢谢。对我来说,它已经将所有内容复制到include文件夹,但应该包含/php,所以“sudo cp-r/usr/include/php/Applications/MAMP/bin/php/php7.0.0/include/php”注意@fdrv的上述注释,递归cp使用大写字母-r。 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/zend.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/Zend/zend_config.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/php/Zend/zend_config.h