如何修复' PHP'在Mac OS X(10.9.4)中进行制作? [英] How to fix, 'PHP' make, in Mac OS X (10.9.4)?

查看:53
本文介绍了如何修复' PHP'在Mac OS X(10.9.4)中进行制作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

以下[blog]中的步骤(

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'.

在执行"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

在[post]下看到了类似的问题(

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

如果得到以下/Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend.h:51:11:致命错误:找不到"zend_config.h"文件,请确保您进行了配置PHP的来源.即在您复制所有文件的目录中运行./configure – greg 2013年1月19日,2:41

If you get the following /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found make sure you configure php sources. i.e. in the directory where you copied all the files run ./configure – greg Jan 19 '13 at 2:41

尽管,我已经运行过./configure,但仍会发生上述错误.

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

可以帮助我了解我在想什么吗?

Can help me understand what am I missing?

提前谢谢!

推荐答案

所以我找到了一个对我有用的解决方案.

so I found a solution that worked for me.

转到您的终端并输入

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

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

将粗体字母替换为您使用的php版本

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

然后运行make命令

这篇关于如何修复&amp;#39; PHP&amp;#39;在Mac OS X(10.9.4)中进行制作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆