Symfony Composer icu requires lib-icu

运行php compser.phar 的时候出现此问题的时候解决办法

问题描述
Problem 1 -Installation request for symfony/icu v1.2.1 -> satisfiable by symfony/icu[v1.2.1] -symfony/icu v1.2.1 requires lib-icu >=4.4 -> the requested linked library icu has the extension providing it. Problem 2 -symfony/symfony v2.5.0 requires symfony/icu ~1.0 -> satisfiable by symfony/icu[v1.2.1]. -symfony/symfony v2.5.0 requires symfony/icu ~1.0 -> satisfiable by symfony/icu[v1.2.1]. -symfony/icu v1.2.1 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure have the extension providing it. - Installation request for symfony/symfony v2.5.0 -> satisfiable by symfony/symfony[v2.5.0]. 解决办法

A better solution is to fix your composer.json to the version required by the production server. First, determine the ICU version on the server:

$ php -i | grep ICU
ICU version => 4.2.1
Then fix the Icu component in your composer.json file to a matching version:

"require: {
"symfony/icu": "1.1.*"
}
Set the version to

"1.0.*" if the server does not have the intl extension installed;
"1.1.*" if the server is compiled with ICU 4.2 or lower.
Finally, run php composer.phar update symfony/icu on your development machine, test extensively and deploy again. The installation of the dependencies will now succeed.



参考:http://symfony.com/doc/current/components/intl.html

上一篇:Redis 3.0.0 集群部署


下一篇:第二篇:操纵MySQL数据库(2) - 基于ORM思想的SQLAlchemy库