When I run the command php bin/magento setup:di:compile I am getting an error as below

PHP Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111

  • please give more information.
    – Rv Singh
    Commented Apr 25, 2019 at 11:28
  • When i am deploying i got this error An error occurred during creating the deployment package, error message: Unable to execute command "php /tmp/builds/d-9965693d/bin/magento setup:di:compile 2>&1" -
    – Unknown
    Commented Apr 25, 2019 at 11:29
  • please check it log what's error comes
    – Rv Singh
    Commented Apr 25, 2019 at 11:30
  • Deleting var/generation, var/cache and var/di and try again Commented Apr 25, 2019 at 11:33
  • @SavanPatel Still not working
    – Unknown
    Commented Apr 25, 2019 at 11:41

2 Answers 2


If this happens regularly when you initiate compile and you're confident you have no errors I've found simply running php bin/magento setup:di:compile a second time will be successful.

  • Yeah this just started happening to me, not happy however it works everyother time is this a permissions thing maybe>
    – harri
    Commented Feb 24, 2021 at 15:47

Its due to improper module configuration. You can debug it by disabling recent modules that you installed and also check for missing files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.