You may encounter below fatal error While installing Magento 2.0 Fatal error: Uncaught exception ‘Magento\Framework\Exception\LocalizedException’ with message ‘Can’t create directory /home/tahir/www/magento-2.0/var/generation/Magento/Framework/App/ResourceConnection/.’ in /home/tahir/www/magento-2.0/vendor/magento/framework/Code/Generator.php:103 Stack trace: #0 /home/tahir/www/magento-2.0/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass(‘Magento\Framewo…’) #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load(‘Magento\Framewo…’) #2 [internal function]: spl_autoload_call(‘Magento\Framewo…’) #3 /home/tahir/www/magento-2.0/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct(‘Magento\Framewo…’) #4 /home/tahir/www/magento-2.0/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor(‘Magento\Framewo…’) #5 /home/tahir/www/magento-2.0/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(7 in /home/tahir/www/magento-2.0/vendor/magento/framework/Code/Generator.php on line 103 Changing permissions of /var directory will solve the issue. Run below command from root of your Magento 2.0 directory. Solution:
cd path/to/your/magento/root sudo chmod 755 -R var
Magento
Magento 2: Fix Can't Create Directory Error
You may encounter below fatal error While installing Magento 2.0 Fatal error: Uncaught exception ‘Magento\Framework\Exception\LocalizedException’ wi
· 5 min read · By Tahir Yasin
Related posts
Magento
Get Magento root category id
Learn how to retrieve the root category ID in Magento 1, understand the category hierarchy, avoid inefficient database queries, and use Magento’s built-in methods for cleaner, faster store development.
Magento
Get Magento Website Meta Data and Config Values
Following functions will help you to get Magento meta data like “Default Title”, “Default Description” To get Default Title: [code langu
Magento
Add Home link in Magento top navigation menu
Learn how to easily add a Home link to the Magento top navigation menu using simple template changes and PHP code. By default there is no Home link in Magento top navigation menu but you can easily add it yourself.