Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Install the PHP INTL extension on a Mac
The INTL extension may be included in PHP 5.4, PHP 5.3 is still the main PHP version installed on many production servers. Here is how you install it on a Mac.
Get ICU from
At the time of this writing, I downloaded the 
icu4c-49_1_2-src.tgz package on
Unzip the file. Open a new bash window and go to the /source folder of the unzipped file.
In Terminal, type :
./runConfigureICU MacOSX
sudo make install
sudo pecl install intl
You now have the INTL extension on your hard drive, but you have to copy it in your PHP extensions folder. Since I’m using MAMP, i’m copying it in the MAMP extension folder (which is not the same folder as the CLI PHP extension folder). In Terminal, type :
cp /usr/lib/php/extensions/no-debug-non-zts-20090626/ /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
Edit your php.ini file. In my case, it is located in /Applications/MAMP/bin/php/php5.3.6/conf/php.ini. Add this line to the extensions section :
Restart MAMP.
Enjoy !

When I run "sudo pecl install intl" i got this error:

include <php.h>


1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed

Did you get this same error? Do you know how can I resolve?

You find the solution ??

@marcomafessolli I have the same problem

👌 I resolved my problem via xcode-select --install

devTechi commented Dec 9, 2016 edited

@athlonUA Thank you very much. Got me further.

I’m having trouble executing the command sudo pecl install intl. I get the following message:

WARNING: channel "" has updated its protocols, use "pecl channel-update" to update
Cannot install, php_dir for channel "" is not writeable by the current user

I tried this solution, but when I run pecl config-get php_dir it gives me the following directory that doesn’t seem to exist:


So obviously trying to change ownership of said directory doesn’t work. Did anybody else run into this issue?

I'm having issues at

sudo pecl install intl

during the process, i get an error:

/usr/local/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text)) {}
/usr/local/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text), length) {}
/usr/local/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}

anyone have similar issues?

torleif commented May 9, 2017

@kailasnarendran I'm having the same issue. No fixes yet.

kailasnarendran commented May 9, 2017 edited

I just figured out the solution to the problem with "delegating constructors are permitted only in C++11"

It looks like the latest version of ICU uses the C++11 features that are not available in osx sierra.

I had to download 58 to get this to work.

to get intl to successfully install I had to disable SIP (

Daou commented May 11, 2017

I can verify @kailasnarendran, using the 58 works. 59 doesn't...

giordhano commented Jun 14, 2017 edited

On macos Captain
We need specified -std=c++11 for CXXFLAGS in the makefile.


Download the ICU 59.1 source, and edit source/runConfigureICU add -std=c++11 in RELEASE_CXXFLAGS line

        THE_OS="MacOS X (Darwin)"
        THE_COMP="the default"
        RELEASE_CXXFLAGS='-O2 -std=c++11' 
        DEBUG_CFLAGS='-g -O0' 
        DEBUG_CXXFLAGS='-g -O0'

./runConfigureICU MacOSX
make install

Second: install AutoConf

cd ~ && curl -O
tar -zxvf autoconf-latest.tar.gz
cd autoconf-2.69
sudo make install


Download intl-3.0.0 code (

cd intl-3.0.0/intl-3.0.0
phpize --clean

Here, edit Makefile search CXXFLAGS line and add -std=c++11

CXX = g++
CXXFLAGS = -g -O2 -std=c++11

Save changes and run
make install

This works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment