PHP-在OSX 10.9上编译Phalcon的问题
作者:互联网
尝试遵循文档中的说明:
跑步
$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很长时间,但未安装预安装的扩展程序并解决库依赖关系会浪费大量的空闲时间,并且需要额外的精力,从而在无关的Google结果中迷失了方向.我的经验告诉我,这很困难.我强烈建议在Mac OS X上使用Homebrew,以消除真正不必要的麻烦.
在成功安装Homebrew之后,具有如下所示的Phalcon扩展(以及数千个其他开源libs / tools / apps):
$brew tap josegonzalez/homebrew-php
$brew install php55-phalcon
当您需要其他扩展名或库时,只需键入:
$brew search <whatever>
要了解有关公式或安装选项的更多信息:
$brew info <whatever>
注意:Homebrew需要安装Xcode.酿造前,请确保Mac上已安装Xcode.如果出现问题,请使用brew doctor命令了解发生的情况.
标签:phalcon,php,macos 来源: https://codeday.me/bug/20191121/2051654.html