鍍金池/ 問(wèn)答/Java  PHP  iOS  網(wǎng)絡(luò)安全/ Error installing intl extension on MacOS

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?

回答
編輯回答
命多硬

用好百度,天下無(wú)雙https://my.oschina.net/lampdr...,可以參考這篇文章,大概就是php7移除php_smart_str而用php_smart_string代替,是兼容問(wèn)題

2018年2月17日 06:24