RuntimeException: Can't create directory /usr/share/apache2/magento/var/generation/Magento/Framework/App/Config/Initial/Converter/. in /usr/share/apache2/magento/vendor/magento/framework/Code/Generator.php:115 Stack trace: #0 /usr/share/apache2/magento/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 /usr/share/apache2/magento/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...') #4 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #5 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #6 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #7 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #8 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'converter', 'Magento\\Framewo...') #9 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array) #10 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #11 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #12 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'reader', 'Magento\\Config\\...') #13 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Config\\...', Array, Array) #14 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Config\\...') #15 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(163): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Config\\...') #16 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(175): Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(Array) #17 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(139): Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(Array) #18 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, NULL, Array, 'sources', 'systemConfigSou...') #19 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('systemConfigSou...', Array, Array) #20 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('systemConfigSou...') #21 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('systemConfigSou...') #22 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'source', 'Magento\\Config\\...') #23 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Config\\...', Array, Array) #24 /usr/share/apache2/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Config\\...') #25 /usr/share/apache2/magento/var/generation/Magento/Config/App/Config/Type/System/Reader/Proxy.php(84): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Config\\...') #26 /usr/share/apache2/magento/var/generation/Magento/Config/App/Config/Type/System/Reader/Proxy.php(95): Magento\Config\App\Config\Type\System\Reader\Proxy->_getSubject() #27 /usr/share/apache2/magento/vendor/magento/module-config/App/Config/Type/System.php(212): Magento\Config\App\Config\Type\System\Reader\Proxy->read() #28 /usr/share/apache2/magento/vendor/magento/module-config/App/Config/Type/System.php(170): Magento\Config\App\Config\Type\System->loadDefaultScopeData('default') #29 /usr/share/apache2/magento/vendor/magento/framework/App/Config.php(139): Magento\Config\App\Config\Type\System->get('default/web/sec...') #30 /usr/share/apache2/magento/vendor/magento/framework/App/Config.php(90): Magento\Framework\App\Config->get('system', 'default/web/sec...') #31 /usr/share/apache2/magento/vendor/magento/framework/App/Config.php(103): Magento\Framework\App\Config->getValue('web/secure/use_...', 'default', NULL) #32 /usr/share/apache2/magento/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag('web/secure/use_...') #33 /usr/share/apache2/magento/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #34 /usr/share/apache2/magento/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #35 /usr/share/apache2/magento/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(117): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #36 /usr/share/apache2/magento/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #37 /usr/share/apache2/magento/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(RuntimeException)) #38 /usr/share/apache2/magento/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(RuntimeException)) #39 /usr/share/apache2/magento/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #40 {main}