Problems installing Symfony 2.4.1 lib-icu 4.4 dependency

A. Duff picture A. Duff · Jan 8, 2014 · Viewed 8.7k times · Source

I'm having a problem identical to this one, but the solution provided there isn't working for me.

I downloaded the Symfony 2.4.1 Standard Vendors with Vendors package from the Symfony Downloads Page. After extracting the files and downloading composer.phar, I run php composer.phar install and get this error:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - 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/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.
    - Installation request for symfony/icu v1.2.0 -> satisfiable by symfony/icu[v1.2.0].

Following the instructions on the thread linked to above, I updated PEAR libraries and did sudo pear install pecl/intl. (This is on CentOS so I didn't follow the MAMP stuff). This didn't work and I realized I had to do a sudo yum install libicu. After this, sudo pear install pecl/intl worked, and I edited php.ini to add the extension=intl.so line and then restarted the Apache server.

But I'm still getting the same error as above, and in addition, any time I run PHP it gives the warning:

PHP Warning:  Module 'intl' already loaded in Unknown on line 0

Looking at the output of phpinfo() I see that the installed intl version is 1.1.0, and the ICU version is 4.2.1 (which explains why Symfony is complaining that it needs 4.4). But when I do /usr/bin/pecl install intl it says

pecl/intl is already installed and is the same as the released version 3.0.0

And the sudo yum install libicu should have installed the latest version.

Is there any way to get the 4.4 version?

Answer

Jody picture Jody · Jan 9, 2014

For your specific situation, you should specify in your composer.json file that you want to use "symfony/icu": "1.1.*"

See the "ICU and Deployment Problems" section of this page: https://symfony.com/doc/2.4/components/intl.html