原始问题:
原文链接:https://www.f2er.com/centos/373973.html我在CentOs 5机器上安装PHP Pecl Intl扩展时遇到问题.
使用以下命令安装icu和libicu之后:
$yum install icu $yum install libicu
我尝试像这样安装Intl扩展:
$/usr/bin/pecl install intl
checking whether to enable internationalization support... yes,shared checking for icu-config... no checking for location of ICU headers and libraries... not found configure: error: Unable to detect ICU prefix or no Failed. Please verify ICU install prefix and make sure icu-config works. ERROR: `/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' Failed
更新
按照RusAlex(感谢RusAlex)的建议成功安装icu的开发版本之后:
$yum install libicu-devel
我遇到了一个新问题,我在本地也遇到了以下命令:
$/usr/bin/pecl install intl
现在产生这个错误:
/private/tmp/pear/temp/intl/collator/collator_class.c:92: error: duplicate 'static' /private/tmp/pear/temp/intl/collator/collator_class.c:96: error: duplicate 'static' /private/tmp/pear/temp/intl/collator/collator_class.c:101: error: duplicate 'static' /private/tmp/pear/temp/intl/collator/collator_class.c:107: error: duplicate 'static' make: *** [collator/collator_class.lo] Error 1 ERROR: `make' Failed