I have this error:
Fatal error: Class 'Locale' not found in
vendor/magento/framework/Locale/Bundle/DataBundle.php
on line 64
in Magento 2 when I try do use this command to clear the cached files:
php bin/magento setup:static-content:deploy
Does anyone else have this problem?
Later Edit:
I want to regenerate the static content, it was a bad wording before.
I am using Magento 2.0.2 and I used the downloaded file from magento.com
Best Answer
You php do not have
intl
extension. You can verify it by runphp -i
.In many cases this problem appear when you have different php version/configurations for apache and cli. For example if use install MAMP on MacOsX that you will have different version. To use php in this case you need specify full path to php like
/Applications/MAMP/bin/php/php7.0.0/bin/php
To change it you need to do folowing steps:
Edit
~/.bash_profile
and addwhere
/Applications/MAMP/bin/php/php7.x.x
should be patch to your latest wersionIn Terminal, run
source ~/.bash_profile
In Terminal, type in
which php
and look for the updated patch. If everything was successful, It should output the new path to MAMP PHP install.In case it doesn't output the correct path, try closing the terminal window (exit fully) and open again, it should apply the changes (Restart in short).