0

so I cant install the intl.so extension, which I need for my phpUnit test. My system

  • macOS Mojave
  • PHP 7.1.19 installed at /usr/bin/php

php -m | grep intl returns nothing.

So i tried to Install intl with

sudo /Users/beatgurtner/pear/bin/pecl install intl

This command asks for the ICU path:

Specify where ICU libraries and headers can be found [DEFAULT]

I type:

/usr/local/Cellar/icu4c/62.1

And finally end up with an error:

configure: creating ./config.status config.status: creating config.h running: make /bin/sh /private/tmp/pear/install/pear-build-rootBSsAtU/intl-3.0.0/libtool --mode=compile cc -I/usr/local/Cellar/icu4c/62.1/include -Wno-write-strings -I. -I/private/tmp/pear/install/intl -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-rootBSsAtU/intl-3.0.0/include -I/private/tmp/pear/install/pear-build-rootBSsAtU/intl-3.0.0/main -I/private/tmp/pear/install/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/icu4c/62.1/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/intl/php_intl.c -o php_intl.lo mkdir .libs cc -I/usr/local/Cellar/icu4c/62.1/include -Wno-write-strings -I. -I/private/tmp/pear/install/intl -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-rootBSsAtU/intl-3.0.0/include -I/private/tmp/pear/install/pear-build-rootBSsAtU/intl-3.0.0/main -I/private/tmp/pear/install/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/icu4c/62.1/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/intl/php_intl.c -fno-common -DPIC -o .libs/php_intl.o In file included from /private/tmp/pear/install/intl/php_intl.c:25: /private/tmp/pear/install/intl/php_intl.h:23:10: fatal error: php.h file not found include <php.h> ^~~~~~~ 1 error generated. make: *** [php_intl.lo] Error 1 ERROR: make failed

My xcode is up-to-date!

How can I install php7 with intl extension on my mac?!?

thanks for the help!

UPDATE:

Things i tried form other solutions, that did not work for me:

pecl install memcached

(https://stackoverflow.com/a/51265080/2839368)

brew install php70-intl

(https://stackoverflow.com/a/44523507/2839368)

Error i get from that:

Error: No available formula with the name php71-intl ==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run: git -C $(brew --repo homebrew/core) fetch --unshallow

Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps.

Another thing which was suggested: `curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2 [WARNING] Detected macOS Mojave 10.14. There are serious issues with it, due to the original apache not loading foreign libraries anymore. PHP within apache will most certainly not work anymore if you proceed! The cli version still will. See this issue at https://github.com/liip/php-osx/issues/249 for details and discussion

So nothing worked... Please remove the duplicated mark!

SOLUTION: OK. So sometimes it can be simple: I just downloaded the intl.so file from https://github.com/skmedia/php-extensions-mamp/blob/master/php-5.4.4/intl.so and copied it to /usr/lib/php/extensions/no-debug-non-zts-20160303!

Reboot and now it works...

B. Rentrug
  • 103
  • 1
  • 11
  • OK. So sometimes it can be simple: I just downloaded the intl.so file from https://github.com/skmedia/php-extensions-mamp/blob/master/php-5.4.4/intl.so and copied it to /usr/lib/php/extensions/no-debug-non-zts-20160303! Reboot and now it works... (I think I nowhere read this solutions!) – B. Rentrug Nov 15 '18 at 12:47

0 Answers0