Solution for Uncaught Error: Class ‘Locale’ not found in vendor/magento/framework/Locale/Bundle/DataBundle.php:64 in magento

Below error message we may receive when we setup magento in our system. (Or) We may also receive this error message when we deploy magento by grunt command.

PHP Fatal error: Uncaught Error: Class 'Locale' not found in vendor/magento/framework/Locale/Bundle/DataBundle.php:64<br>Stack trace:<br>0 /var/www/magento2/vendor/magento/framework/Locale/Bundle/DataBundle.php(28): Magento\Framework\Locale\Bundle\DataBundle-&gt;cleanLocale()<br>1 /var/www/magento2/vendor/magento/framework/Setup/Lists.php(96): Magento\Framework\Locale\Bundle\DataBundle-&gt;get()<br>2 /var/www/magento2/vendor/magento/framework/Validator/Locale.php(42): Magento\Framework\Setup\Lists-&gt;getLocaleList()<br>3 /var/www/magento2/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(321): Magento\Framework\Validator\Locale-&gt;isValid()<br>4 /var/www/magento2/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(241): Magento\Setup\Console\Command\InstallStoreConfigurationCommand-&gt;validateCodes()<br>5 /var/www/magento2/setup/src/Magento/Setup/Console/Command/InstallCommand.php(268): Magento\Setup\Console\Command\InstallStore in /var/www/magento2/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

Solution:
1. First check is php-intl extension is available or not our system. If not, then we have to install it.
2. Second check is, we have to cross check our bash_profile file. Here we have to check our “bin/php/php7.x.xx/bin:$PATH” is proper/set (or) not. If not, then we have to set it & we have to execute step:2.2 command.
2.1) Go to below folder Path(Linux) :
cd ~
vi .bash_profile //Below is sample code
2.2)source ~/.bash_profile

Wear A Mask!!!