Error installing intl extension on MacOSx php7

php version :

clipboard.png

install step:

$sudo pecl update-channels

Output:

clipboard.png

$sudo pecl install intl

Output:

 cc -I/Applications/XAMPP/xamppfiles/include -Wno-write-strings -I. -I/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl -DPHP_ATOM_INC -I/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/pear-build-rootk5lReQ/intl-3.0.0/include -I/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/pear-build-rootk5lReQ/intl-3.0.0/main -I/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -I/Applications/XAMPP/xamppfiles/include -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/php_intl.c  -fno-common -DPIC -o .libs/php_intl.o
In file included from /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/php_intl.c:25:
In file included from /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/php_intl.h:34:
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
#include <ext/standard/php_smart_str.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed


I can't find a solution, anyone could help me?

阅读 4.3k
1 个回答
新手上路,请多包涵

用好百度,天下无双https://my.oschina.net/lampdr...,可以参考这篇文章,大概就是php7移除php_smart_str而用php_smart_string代替,是兼容问题

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏