Php: Get the latest ICU version (got libicu 52.1 instead of 57.1)

Created on 1 Oct 2016  路  10Comments  路  Source: docker-library/php

My Dockerfile:

FROM php:7.0-fpm

RUN apt-get update && \
    apt-get install -y libicu-dev && \
    docker-php-ext-install intl

When I run the symfony requirements binary, I got this message:

 * intl ICU version installed on your system is outdated (52.1) and
   does not match the ICU data bundled with Symfony (57.1)
   > To get the latest internationalization data upgrade the ICU
   > system package and the intl PHP extension.

Do you know how can I get the latest ICU version ?
Thanks

Most helpful comment

Hello @romqin

Here a workaround to your problem. Compile yourself the icu library with the version you want:

RUN curl -sS -o /tmp/icu.tar.gz -L http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install

RUN docker-php-ext-configure intl --with-icu-dir=/usr/local && \
    docker-php-ext-install intl

All 10 comments

That is the latest available in Debian Jessie: https://packages.debian.org/jessie/libicu-dev.

Hello @romqin

Here a workaround to your problem. Compile yourself the icu library with the version you want:

RUN curl -sS -o /tmp/icu.tar.gz -L http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install

RUN docker-php-ext-configure intl --with-icu-dir=/usr/local && \
    docker-php-ext-install intl

my solution with OS X was:
run
curl -sS -o /tmp/icu.tar.gz -L http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && sudo make install

than run
sudo pecl install intl

and than
Specify where ICU libraries and headers can be found [DEFAULT] : /usr/local

Btw: This rather large test suite https://github.com/yiisoft/yii2/issues/13750 fails with ICU 57.1 but not with ICU 52.1

@schmunk42 ICU rules get changed time-to-time, so assertions may become outdated.
Generally it's not a problem.

and how to upgrade in Windows

and how to upgrade in Windows

updated "get the latest icu" here: https://github.com/docker-library/php/issues/455#issuecomment-309921509

i got error on my mac with Mamp Pro
In file included from /private/tmp/pear/temp/intl/php_intl.c:25:
/private/tmp/pear/temp/intl/php_intl.h:23:10: fatal error: 'php.h' file not found

include

     ^

1 error generated.
make: * [php_intl.lo] Error 1
ERROR: `make' failed

How can i fix it?

Is there a solution?
intl ICU version installed on your system is outdated (52.1) and does not match the ICU data bundled with Symfony (59.1)
To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.
2017-07-31

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PMExtra picture PMExtra  路  3Comments

solocommand picture solocommand  路  3Comments

2Kable picture 2Kable  路  3Comments

pavlakis picture pavlakis  路  3Comments

nojimage picture nojimage  路  3Comments