Installing/enabling PHP Pecl Intl extension on CentOs 5
Posted
by
Marijn Huizendveld
on Server Fault
See other posts from Server Fault
or by Marijn Huizendveld
Published on 2010-12-09T15:52:47Z
Indexed on
2010/12/21
8:55 UTC
Read the original article
Hit count: 393
Original question:
I'm having trouble installing the PHP Pecl Intl extension on my CentOs 5 machine.
After installing both icu
and libicu
with the following commands:
$ yum install icu
$ yum install libicu
I tried to install the Intl extension like so:
$ /usr/bin/pecl install intl
I selected to search for the default location for the ICU libraries and header files. It ends up crashing like this:
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
update
After successfully installing the development version of icu as suggested by RusAlex (thanks RusAlex) like so:
$ yum install libicu-devel
I ran into a new problem which I also encountered locally the following command:
$ /usr/bin/pecl install intl
now produces this error:
/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
It appears to have something to do with PHP 5.3 being bundled with Intl already. But how can I enable this extension, if I look in my PHP Info than I cannot find any reference to it...
© Server Fault or respective owner