magento2: Unable to Install Magento 2.1:: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface

Using composer created project. When tried to access the browser I got following error:

Fatal error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface 
in /var/www/2mage/mage-21/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

Here are system level details:

Mac OSX 10.10.5.
> php -v
PHP 5.6.22 (cli)
> bin/magento 
Magento CLI version 2.1.0

Steps to reproduce

Created project as:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.1.0 

After that cerated vhost and pointed browser and got this error: Please see the screenshot attached. screen shot 2016-07-30 at 7 14 50 pm

There is also a strange thing that I noticed the CLI option are also less.

Available commands:
 help                                      Displays help for a command
 list                                      Lists commands
admin
 admin:user:create                         Creates an administrator
i18n
 i18n:collect-phrases                      Discovers phrases in the codebase
 i18n:pack                                 Saves language package
info
 info:adminuri                             Displays the Magento Admin URI
 info:backups:list                         Prints list of available backup files
 info:currency:list                        Displays the list of available currencies
 info:dependencies:show-framework          Shows number of dependencies on Magento framework
 info:dependencies:show-modules            Shows number of dependencies between modules
 info:dependencies:show-modules-circular   Shows number of circular dependencies between modules
 info:language:list                        Displays the list of available language locales
 info:timezone:list                        Displays the list of available timezones
maintenance
 maintenance:allow-ips                     Sets maintenance mode exempt IPs
 maintenance:disable                       Disables maintenance mode
 maintenance:enable                        Enables maintenance mode
 maintenance:status                        Displays maintenance mode status
module
 module:disable                            Disables specified modules
 module:enable                             Enables specified modules
 module:status                             Displays status of modules
 module:uninstall                          Uninstalls modules installed by composer
sampledata
 sampledata:deploy                         Deploy sample data modules
 sampledata:remove                         Remove all sample data packages from composer.json
setup
 setup:backup                              Takes backup of Magento Application code base, media and database
 setup:config:set                          Creates or modifies the deployment configuration
 setup:cron:run                            Runs cron job scheduled for setup application
 setup:db-data:upgrade                     Installs and upgrades data in the DB
 setup:db-schema:upgrade                   Installs and upgrades the DB schema
 setup:db:status                           Checks if DB schema or data requires upgrade
 setup:di:compile                          Generates DI configuration and all missing classes that can be auto-generated
 setup:install                             Installs the Magento application
 setup:performance:generate-fixtures       Generates fixtures
 setup:rollback                            Rolls back Magento Application codebase, media and database
 setup:store-config:set                    Installs the store configuration
 setup:uninstall                           Uninstalls the Magento application
 setup:upgrade                             Upgrades the Magento application, DB data, and schema

When I checked the CLI options on my teammates machine(ubuntu 14.04) it has more options and setup also worked again. I tried with downloading zip also from https://www.magentocommerce.com/download But I had same results Any help whats wrong going on here ?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 26 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@kaurg2516 Don’t modify the files in your vendor directory.

if you are getting error related to payment token interface try this.

  1. Go to /vendor/magento/module-vault/etc/di.xml from your magento root directory.
  2. Paste This code: <preference for="Magento\Vault\Api\Data\PaymentTokenInterfaceFactory" type="Magento\Vault\Model\AccountPaymentTokenFactory"/> in line between 10-17.

I think I have found my mistake. I was trying to run setup via www.vhost.com however when I tried with www.vhost.com/setup it worked. So my problem is solved. But probably bug remains. If magento is not installed it should take user to /setup automatically

Experienced Same problem with default root. But if i try <web root>/setup, it ran successfully.

and also i need to comment the line cgi.fix_pathinfo=0, in my php-fpm php.ini file.

I changed root $MAGE_ROOT/pub to root $MAGE_ROOT in nginx configuration file and setup works fine now.

once it is installed I changed it back.

I had the same issue when I tried to install magento through https protocol. When i switched to http and document root from /magneto2/pub/ to /magento2/ - setup started works! Env: Apache 2.4 + mod php 5.6 Magento 2.1 installed via composer