Skip to content

Instantly share code, notes, and snippets.

@queval-j
Created September 29, 2016 15:18
Show Gist options
  • Save queval-j/02922e73e5b52779048717b8a1a467f2 to your computer and use it in GitHub Desktop.
Save queval-j/02922e73e5b52779048717b8a1a467f2 to your computer and use it in GitHub Desktop.
[macOS Sierra] Install intl to MAMP 3
# You have to have ICU4C and PECL installed
# ICU4C : brew install icu4c
# PECL / PEAR : http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
# Change the ICU_DIR by your ICU4C version
ICU_DIR=/usr/local/Cellar/icu4c/57.1/
# Change the EXT_DIR by the location of your PHP extensions
EXT_DIR=/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/
curl https://pecl.php.net/get/intl-3.0.0.tgz > intl-3.0.0.tgz
tar -xvf intl-3.0.0.tgz
cd intl-3.0.0
phpize
./configure --with-icu-dir=$ICU_DIR
make
cp -rfv modules/intl.so $EXT_DIR
echo 'Add "extension=intl.so" in your php.ini and restart MAMP Server'
@kyds3k
Copy link

kyds3k commented Jul 31, 2017

Hi! I'm trying to use this - updated the icu4c version to 58.2, the php version to 7.0.20, and to no-debug-non-sts-20151012 . . .

I get this error:

In file included from /Users/adamdarby/intl-3.0.0/php_intl.c:25:
In file included from ./php_intl.h:34:
./intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
#include <ext/standard/php_smart_str.h>
         ^
1 error generated.
make: *** [php_intl.lo] Error 1
cp: modules/intl.so: No such file or directory

Any ideas? I'm running MAMP 4.2.

@ldarikl
Copy link

ldarikl commented Sep 26, 2018

@kyds3k did you find solution?

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