Install Intl in PHP , Mac

To install Intl library for PHP in Mac , you need to install brew first.

Install Brew For ICU

First , update the brew

brew update

Search the ice package name.

 brew search icu

You will find like icu4c and install it.

brew install icu4c

Your icu4c path is


Version may not be same. You can check director at /usr/local/Cellar/icu4c/

After we got icu4c , we can install intl from peel.

Install Pear

To install pear package , need to install autoconf

brew install autoconf

Time to Install Pear

curl -O
sudo php -d detect_unicode=0 go-pear.phar

Configure and Install PEAR

You should now be at a prompt to configure PEAR.

  1. Type 1 and press return.
  2. Enter: /usr/local/pear
  3. Type 4 and press return.
  4. Enter: /usr/local/bin
  5. Press return

Install Intl

After install pear , you can install intl from peel.

$ sudo pecl update-channels
$ sudo pecl install intl

Config Php.ini

After install the intl, you just need to enable on php.ini.

sudo vim /etc/php.ini

Add extension like following.

type :wq (save and exit). After that , we need to restart the apache.

sudo apachectl restart

Now , you can check the intl library like following

php -m | grep intl # should return 'intl'


comments powered byDisqus