How to fix, 'PHP' make, in Mac OS X (10.9.4)?

匿名 (未验证) 提交于 2019-12-03 08:52:47

问题:

I'm adding postgres support to PHP on OS X Mavericks (10.9.4).

Followed steps from [blog] (http://blog.rupey.org/post/63221360055/adding-postgres-support-to-php-on-os-x-mavericks)... fixed in between errors, and, reached till 'make'.

While performing 'make' I get the below error. ------ERROR------

users-mbp:pdo_pgsql RK$ pwd /usr/include/php/ext/pdo_pgsql  users-mbp:pdo_pgsql RK$ make /bin/sh /usr/include/php/ext/pdo_pgsql/libtool --mode=compile 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/ext/pdo_pgsql -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -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/ext/pdo_pgsql -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -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  -fno-common -DPIC -o .libs/pdo_pgsql.o In file included from /usr/include/php/ext/pdo_pgsql/pdo_pgsql.c:25: In file included from /usr/include/php/main/php.h:34: /usr/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found # include <zend_config.h>       ^ 1 error generated. make: *** [pdo_pgsql.lo] Error 1 users-mbp:pdo_pgsql RK$   ------ERROR------} 

But, I could locate the files in the below directories:

 /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  

Saw a similar issue under [post] (Having problems while try to install OAUTH with PECL in MAMP on mac OS lion). -which suggests:

Though, I've already run ./configure, the above error still occurs.

Can help me understand what am I missing?

Thanks in advance!

回答1:

so I found a solution that worked for me.

Head on over to your terminal and type

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

Replace the bold lettering with the version of php you're using

then run the make command



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!