尝试遵循文档中的说明:
运行
$ sudo ./install
得到这个:
gcc -I. -I/Users/honky/cphalcon/build/64bits -DPHP_ATOM_INC -I/Users/honky/cphalcon/build/64bits/include -I/Users/honky/cphalcon/build/64bits/main -I/Users/honky/cphalcon/build/64bits -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /Users/honky/cphalcon/build/64bits/phalcon.c -fno-common -DPIC -o .libs/phalcon.o
/Users/honky/cphalcon/build/64bits/phalcon.c:108409:21: error: libintl.h: No such file or directory
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_translate_adapter_gettext_read_dimension’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108425: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_translate_adapter_gettext_has_dimension’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108441: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘zim_Phalcon_Translate_Adapter_Gettext_query’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108553: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c:108555: warning: incompatible implicit declaration of built-in function ‘dgettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘zim_Phalcon_Translate_Adapter_Gettext_exists’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108590: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c:108592: warning: incompatible implicit declaration of built-in function ‘dgettext’
make: *** [phalcon.lo] Error 1
有什么猜测吗?
最佳答案
Mac os x 预装了很长时间的 PHP 5.x,但安装未预装的扩展和解决库依赖性会占用大量空闲时间并需要额外的努力,迷失在不相关的谷歌搜索结果中。我的经历告诉我,这是一条艰难的道路。我强烈建议使用 Homebrew在 Mac OS X 上消除像这样真正不必要的痛苦。
成功安装 Homebrew 后,拥有 Phalcon 扩展(以及数以千计的其他开源库/工具/应用程序)就像这样简单:
$ brew tap josegonzalez/homebrew-php
$ brew install php55-phalcon
当您需要另一个扩展或库时,只需键入:
$ brew search <whatever>
要了解有关公式或安装选项的更多信息:
$ brew info <whatever>
注意: Homebrew 需要安装 Xcode .在 brewing 之前确保你的 mac 上安装了 Xcode。如果出现问题,请使用 brew doctor
命令了解发生了什么。
关于php - 在 osx 10.9 上编译 phalcon 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25095942/