LoginSignup
13
15

More than 5 years have passed since last update.

CentOSでSymfony2をインストールする際、ICUライブラリのバージョンでつまづく

Last updated at Posted at 2013-08-24

Symfony 2.3 をダウンロードし php composer.phar install すると以下のようなエラーが出ることがある。

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/icu v1.2.0 -> satisfiable by symfony/icu[v1.2.0].
    - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
  Problem 2
    - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
    - symfony/symfony v2.3.3 requires symfony/icu ~1.0 -> satisfiable by symfony/icu[v1.2.0].
    - Installation request for symfony/symfony v2.3.3 -> satisfiable by symfony/symfony[v2.3.3].

ICU ( International Components for Unicode ) ライブラリの4.4以上が必要だよ、と。

これは、CentOSでyumを使ったパッケージ管理をしている場合、yum install php-intl でインストールされるのは ICUの4.2のため。

なので、手動でICUの最新版をインストールし直す必要がある。

# php-intlをアンインストール
yum remove libicu*

# ソースファイルを取得
wget http://download.icu-project.org/files/icu4c/51.2/icu4c-51_2-src.tgz
tar zxf icu4c-51_2-src.tgz 
cd icu/source/

# インストール
./configure
make
make install

# intlモジュールを再度インストール
pear install pecl/intl

# php_ini に追記
echo "extension=intl.so" > /etc/php.d/intl.ini

で、再度 php composer.phar install を実行

13
15
1

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
13
15