docker-symfony
docker-symfony copied to clipboard
Having problem installing `intl`
Hi,
as I'm working on international project, I'm taking the advantage of the intl PHP extension. Symfony also recommends to install it.
I tried many different options, but couldn't get it installed.
First of all I had to install libicu-dev package:
docker-compose exec php apt install libicu-dev
Then I tried to do similar thing for intl:
docker-compose exec php apt install php7.1-intl
but the error says the package could not be found.
I even added ppa:ondrej/php repository, but it says:
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/dists/jessie/main/binary-amd64/Packages 403 Forbidden
I also tried to install that by PECL:
docker-compose exec php pecl install intl
but it throws the following error:
compilation terminated.
Makefile:194: recipe for target 'php_intl.lo' failed
make: *** [php_intl.lo] Error 1
ERROR: `make' failed
Do you have any idea of how to make this working?
Hi,
I think you should run docker-php-ext-install command in your PHP container.
https://github.com/maxpou/docker-symfony/blob/master/php7-fpm/Dockerfile#L22
Then update Dockerfile.
Thanks @maxpou , it worked. I tried this solution at a very beginning, but it didn't work without the libicu-dev package. After installing it, I was trying other approaches and forgot about the easiest path.
I've created pull request for this - https://github.com/maxpou/docker-symfony/pull/79/files
I think it's worth merging it, as Symfony recommends intl extension, anyway.
The other thing I was struggling with, but less important, is this message printed by bin/symfony_requirements:
* intl ICU version installed on your system is outdated (52.1) and
does not match the ICU data bundled with Symfony (60.1)
> To get the latest internationalization data upgrade the ICU
> system package and the intl PHP extension.
I was trying to update the ICU package, but with no success. Do you think it would be doable?
Thanks for your great work on the integration. It's really useful!