The requested PHP extension intl is missing from your system (SonataAdminBundle) in Symfony2
Asked Answered
M

8

16

I try to install the sandbox but I get the following error from composer:

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

Problem 1

- Installation request for sonata-project/intl-bundle 2.1.0 -> satisfiable by sonata-project/intl-bundle 2.1.0.`

- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`

Problem 2

- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`

- sonata-project/news-bundle 2.1.x-dev requires sonata-project/intl-bundle 2.1.* -> satisfiable by sonata-project/intl-bundle 2.1.0.
- Installation request for sonata-project/news-bundle 2.1.
Magda answered 17/7, 2013 at 11:19 Comment(3)
Hi, have u active intl in your php.ini ?Dariusdarjeeling
On Linux: php5-intl installed?Zeitgeist
yes i activated intl in php.iniMagda
A
12

I had the same problem while I was installing new Magento 2.0, after different hit and trials, I manged to solve it by following these steps:

I copied all icu* files from php directory to Appache directory, and it worked.

Php direcotry:

WAMP\bin\php\php5.5.12

Appache Directory:

WAMP\bin\apache\apache2.4.9

Make sure to un-comment following line in php.ini file:

extension=ext/php_intl.dll

Amarette answered 22/11, 2015 at 17:43 Comment(0)
L
12

Linux user

yum install php-intl
Limonene answered 28/4, 2015 at 12:54 Comment(4)
Ubuntu: sudo apt-get install php5-intlMesmerize
homebrew: brew install php55-intlNavigable
On Ubuntu 16.04 use sudo apt-get install php-intlTass
Ubuntu: sudo apt-get install php5.6-intlTransitory
A
12

I had the same problem while I was installing new Magento 2.0, after different hit and trials, I manged to solve it by following these steps:

I copied all icu* files from php directory to Appache directory, and it worked.

Php direcotry:

WAMP\bin\php\php5.5.12

Appache Directory:

WAMP\bin\apache\apache2.4.9

Make sure to un-comment following line in php.ini file:

extension=ext/php_intl.dll

Amarette answered 22/11, 2015 at 17:43 Comment(0)
S
9

Like @Hugehornet pointed out - you should enable this extension in php.ini by uncommenting this line: extension=ext/php_intl.dll

If you use wamp's interface for this task you are actually updating the php.ini file located in apache's directory.

Example: C:\wamp\bin\apache\Apache2.4.4\bin\php.ini

Composer is using the one located in the php's installation directory.

Example: C:\wamp\bin\php\php5.4.12\php.ini

You should manually edit the latter and restart the wamp server.

Soma answered 30/12, 2013 at 10:46 Comment(1)
In my case I didn't have the line at all in my php.ini, so I've just added it, but without "ext/" => extension=php_intl.dll, and it worked.Footrest
B
8

You need to enable the intl extension in php just as the error says. In your php.ini file, uncomment the line extension=ext/php_intl.dll or something like this.

Edit : note that if you are using wamp or something like this, you should be aware of the fact that the php.ini file in the wamp config is not necessarily the one used by composer.

Bullace answered 17/7, 2013 at 11:25 Comment(3)
yes, i am using WAMP, & already enable intl extension of extension=ext/php_intl.dll by uncommenting it in php.ini and still it giving me errorsMagda
What kind of wamp do you have ? WampServer ? uWamp ?Bullace
Look at this and see if it resolves your problem : #16373388Bullace
G
3

First of all be sure that your server is isung x86 build (intl not working with x64), then:

  • activate intl extension in php.ini directly
  • copy all icu*.dll form php directory to apache directory
  • make sure your console using the same php folder you just configured source.

In my windows system I have two php.ini files at the flowing paths:

C:\wamp\bin\php\phpx.y.z
C:\wamp\bin\apache\Apachex.y.z\bin

I don't know which one is in your path. Just make sure to add the extension in both of them to eliminate any doubt.

Griffie answered 2/3, 2015 at 11:24 Comment(0)
O
3

I am on a Mac OS X Yosemite, and I fix this error

the requested PHP extension mcrypt is missing from your system

by running the following commands :

brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
Openhearth answered 21/5, 2015 at 18:2 Comment(1)
Do you use Xampp or WAMPP on your Mac OS X YosemiteSihunn
M
2

If intl has already been enabled and it doesn't works, add your PHP directory in the Path environment variable, then restart your server. (for example C:\Program Files\wamp\bin\php\phpX.XXX.XXX for wamp)

It has worked for me!

Margarettemargarida answered 26/12, 2015 at 22:54 Comment(0)
R
1

On Ubuntu, Debian, and related Linux distributions

sudo apt-get install php-intl

to install the extension for the default PHP version. For other versions a variation like apt-get install php7.3-intl will choose the correct extension if the version provided is correct.

Rinker answered 26/5, 2020 at 12:23 Comment(1)
That's not really accurate, if your repo has php 7.4 and you have 7.2 for example, it'll install php 7.4-intl, not to mention not everyone is running a system that has apt, or even linux.Proselyte

© 2022 - 2024 — McMap. All rights reserved.