Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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...

share|improve this question
sudo yum install libicu
sudo yum install libicu-devel.x86_64
sudo /usr/bin/pecl install intl
sudo echo '' >> /etc/php.ini

And you are good to go. And better enter the manually to php.ini or even more elegant create a new .ini file in the /etc/php.d/ directory.

share|improve this answer
Worked for me. Centos 5.8 x86_64 with CPanel. – djskinner Oct 2 '12 at 16:24

You are correct, you can't install the PECL package because as of PHP 5.3 Intl is part of PHP.

If you installed PHP using YUM, you can just pull down the intl package:

> yum list php*intl
> yum install <file_from_above>
share|improve this answer

This worked for me on Centos 5.6

yum install gcc gcc-cpp gcc-c++ After that all errors to do with intl disappeared

share|improve this answer

seems like you need to install icu-dev or icu-devel package or something similar.

You need development package.

share|improve this answer
Thanks, I'll give this a shot right away! – Marijn Huizendveld Dec 9 '10 at 17:34
Thanks, that got me a little further, I've updated the post accordingly. Just for the sake of reference: the command to install the development version I used is $ yum install libicu-devel – Marijn Huizendveld Dec 9 '10 at 17:47

all you need is

yum install libicu-devel
share|improve this answer
  1. /usr/bin/pecl install intl

  2. Search log checking for icu-config... /usr/bin/icu-config*.
    You'll need a path of the directory which has /bin/icu-config later.

  3. Download php:


    tar xvzf php-5.3.6.tar.gz

    cd php-5.3.6/ext/intl/

  4. compile and install intl module. phpize

    ./configure --enable-intl --with-icu-dir=/usr


    make test

    sudo make install

  5. Finally, append into php.ini.

share|improve this answer

do you have gcc, gcc-cpp, and gcc-c++ installed... At least that was one of my issues during install -

share|improve this answer

I had the same issue on CentOS, and I successfully installed INTL via pecl after:

1) install icu & libs:

yum -y install icu libicu libicu-devel 

2) php-devel package and phpize:

yum -y install php-devel phpize

3) and, of course gcc:

yum -y install gcc gcc-cpp gcc-c++

(+1 to yuri for gcc, gcc-cpp, and gcc-c++ , sorry can't comment due to no rating )

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.