Magento – getting Fatal error: Class ‘IntlDateFormatter’ not found in magento 2.1.8

fatal errormagento-2.1.8

When I deployed my magento store from local host to server then I am getting

Fatal error: Class 'IntlDateFormatter' not found in
vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on
line 93`

After uploading it on server I not seeing my magento home page. when I hit the URL only this error display.

Best Answer

Check your php version :

php -v

Check php-intl packages available :

sudo apt search php | grep intl

Install the php-intl according to your php version (7.1 in my case) :

sudo apt install php-intl php7.1-intl

You may also want to switch PHP version :

sudo update-alternatives --config php
php -v

Restart your webserver if you are done

service apache2 restart