LoginSignup
3
2

More than 5 years have passed since last update.

Laravelでcomposer installしようとしたら、intlがないって言われた時

Posted at

問題

macOS にてcomposer installができない!

  Problem 1
    - Installation request for jeremykendall/php-domain-parser 3.0.0 -> satisfiable by jeremykendall/php-domain-parser[3.0.0].
    - jeremykendall/php-domain-parser 3.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 2
    - Installation request for league/uri 4.1.0 -> satisfiable by league/uri[4.1.0].
    - league/uri 4.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.

のようなエラーがでてしまう。
確かに brew install php56-intl はしていて、入っている。

調査 & 解決まで

phpにintlが入っているのか 

php -i | grep intl

何もでてこない。入ってない。

pecl install

sudo pecl install intl

どうやらpeclというコマンドを使っていれるらしいが、これが動かない

pecl を入れる

Mac OS X El Capitan に pear をインストール
http://qiita.com/applexco/items/f10e87477dc5d41cf751

上記を参考に入れていきます。

ビルドできない

ERROR: `/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' failed

icuのインストール
http://qiita.com/ms2sato/items/fd76d67fd5d63c3cb4a5

上記を参考に入れていきます。

brew install icu4c && brew link icu4c

fatal error: 'php.h' file not found

うごごご。

xcode-select --install
...
pecl install intl
...
Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20131226/intl.so'

php.iniに追記

php.ini
extension=intl.so

解決

Package operations: 95 installs, 0 updates, 0 removals
  - Installing vlucas/phpdotenv (v1.1.1): Cloning 0cac554ce0 from cache
  ...
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2