Install Command fails with "[RuntimeException] Installation failed." #267

Closed
DavidLambauer opened this Issue Feb 5, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@DavidLambauer
Contributor

DavidLambauer commented Feb 5, 2017

When I run n98-magerun2.phar install and follow the Guide, I end with the following Exception:

[RuntimeException] Installation failed.

Environment is the following:
PHP: 7.0.13
Magerun: 1.3.1

This is a Screenshot, where you should able to reproduce.

screenshot at feb 05 22-42-45

@tkn98

This comment has been minimized.

Show comment
Hide comment
@tkn98

tkn98 Feb 6, 2017

Contributor

Hi David, please run the command verbatim (you can see it in the middle) and try to find out what went wrong. Magerun runs it and if it fails you see this exception.

Contributor

tkn98 commented Feb 6, 2017

Hi David, please run the command verbatim (you can see it in the middle) and try to find out what went wrong. Magerun runs it and if it fails you see this exception.

@DavidLambauer

This comment has been minimized.

Show comment
Hide comment
@DavidLambauer

DavidLambauer Feb 6, 2017

Contributor

Hey Tommy,

thanks for the quick answer. Now I am able to see an Exception.

/usr/bin/env php /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/bin/magento setup:install --language='de_DE' --timezone='Europe/Berlin' --db-host='127.0.0.1:32768' --db-name='demoshopintergration' --db-user='root' --base-url='http://demoshop.dev/' --use-rewrites='1' --use-secure='0' --use-secure-admin='1' --admin-user='admin' --admin-lastname='Doe' --admin-firstname='John' --admin-email='john.doe@example.com' --admin-password='password123' --session-save='files' --backend-frontname='admin' --currency='EUR' --db-password='root' --base-url-secure='https://demoshop.dev/'
PHP Fatal error:  Uncaught Error: Class 'Locale' not found in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php:64
Stack trace:
#0 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php(28): Magento\Framework\Locale\Bundle\DataBundle->cleanLocale('en_US')
#1 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Setup/Lists.php(80): Magento\Framework\Locale\Bundle\DataBundle->get('en_US')
#2 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Validator/Locale.php(42): Magento\Framework\Setup\Lists->getLocaleList()
#3 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(307): Magento\Framework\Validator\Locale->isValid('de_DE')
#4 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(197): Mag in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

Fatal error: Uncaught Error: Class 'Locale' not found in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php:64
Stack trace:
#0 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php(28): Magento\Framework\Locale\Bundle\DataBundle->cleanLocale('en_US')
#1 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Setup/Lists.php(80): Magento\Framework\Locale\Bundle\DataBundle->get('en_US')
#2 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Validator/Locale.php(42): Magento\Framework\Setup\Lists->getLocaleList()
#3 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(307): Magento\Framework\Validator\Locale->isValid('de_DE')
#4 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(197): Mag in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

For now I am able to debug it. I'll let you know what happens, when I found out. In general it would be nice, to see the exact same Error Message when running the mr2 command. I'll have a look into that as well.

Contributor

DavidLambauer commented Feb 6, 2017

Hey Tommy,

thanks for the quick answer. Now I am able to see an Exception.

/usr/bin/env php /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/bin/magento setup:install --language='de_DE' --timezone='Europe/Berlin' --db-host='127.0.0.1:32768' --db-name='demoshopintergration' --db-user='root' --base-url='http://demoshop.dev/' --use-rewrites='1' --use-secure='0' --use-secure-admin='1' --admin-user='admin' --admin-lastname='Doe' --admin-firstname='John' --admin-email='john.doe@example.com' --admin-password='password123' --session-save='files' --backend-frontname='admin' --currency='EUR' --db-password='root' --base-url-secure='https://demoshop.dev/'
PHP Fatal error:  Uncaught Error: Class 'Locale' not found in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php:64
Stack trace:
#0 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php(28): Magento\Framework\Locale\Bundle\DataBundle->cleanLocale('en_US')
#1 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Setup/Lists.php(80): Magento\Framework\Locale\Bundle\DataBundle->get('en_US')
#2 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Validator/Locale.php(42): Magento\Framework\Setup\Lists->getLocaleList()
#3 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(307): Magento\Framework\Validator\Locale->isValid('de_DE')
#4 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(197): Mag in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

Fatal error: Uncaught Error: Class 'Locale' not found in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php:64
Stack trace:
#0 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php(28): Magento\Framework\Locale\Bundle\DataBundle->cleanLocale('en_US')
#1 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Setup/Lists.php(80): Magento\Framework\Locale\Bundle\DataBundle->get('en_US')
#2 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Validator/Locale.php(42): Magento\Framework\Setup\Lists->getLocaleList()
#3 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(307): Magento\Framework\Validator\Locale->isValid('de_DE')
#4 /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/setup/src/Magento/Setup/Console/Command/InstallStoreConfigurationCommand.php(197): Mag in /Volumes/Data/Entwicklung/Workspace/netz98/Shops/DemoShop/vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

For now I am able to debug it. I'll let you know what happens, when I found out. In general it would be nice, to see the exact same Error Message when running the mr2 command. I'll have a look into that as well.

@tkn98 tkn98 added the bug label Feb 6, 2017

@tkn98

This comment has been minimized.

Show comment
Hide comment
@tkn98

tkn98 Feb 6, 2017

Contributor

The error output should be visible with Magerun, too. I tag this a a bug.

Contributor

tkn98 commented Feb 6, 2017

The error output should be visible with Magerun, too. I tag this a a bug.

@DavidLambauer

This comment has been minimized.

Show comment
Hide comment
@DavidLambauer

DavidLambauer Feb 6, 2017

Contributor

I found the reason for my problem. /usr/bin/env php doesn't use my aliased php version and due to that, some extensions like php intl are missing. For usability reasons, this should be checked, before running a command. What do you think?

Contributor

DavidLambauer commented Feb 6, 2017

I found the reason for my problem. /usr/bin/env php doesn't use my aliased php version and due to that, some extensions like php intl are missing. For usability reasons, this should be checked, before running a command. What do you think?

@tkn98

This comment has been minimized.

Show comment
Hide comment
@tkn98

tkn98 Feb 6, 2017

Contributor

David, please upgrade to the latest unstable version. Magerun should use for the installer the same PHP binary that is used for Magerun itself.

Contributor

tkn98 commented Feb 6, 2017

David, please upgrade to the latest unstable version. Magerun should use for the installer the same PHP binary that is used for Magerun itself.

@tkn98

This comment has been minimized.

Show comment
Hide comment
@tkn98

tkn98 Feb 6, 2017

Contributor

From a quick check, I'd say this needs forward porting from Magerun 1. We have these issues incl. the better display of errors and the correct PHP binary fixed.

Contributor

tkn98 commented Feb 6, 2017

From a quick check, I'd say this needs forward porting from Magerun 1. We have these issues incl. the better display of errors and the correct PHP binary fixed.

ktomk added a commit to ktomk/n98-magerun2 that referenced this issue Feb 11, 2017

Forward port Magento installer invocation, fixes #267
It came to the attention in #267 that some of the improvements in Magerun 1
when installing Magento were not yet forward ported to Magerun 2.

Fixes in detail:

- Use the same php binary as Magerun is running with (solves the issue
  with aliasing the php binary as reported in #267)

- Using Exec::run() utility (solves the issue of not showing the error
  output if the install command fails as reported in #267)

- When invoking the command, PHP is executed with full error reporting so
  that errors during the install can be more easily trouble-shooted

Refs:

- #267

- Command: install

ktomk added a commit to ktomk/n98-magerun2 that referenced this issue Feb 11, 2017

Forward port Magento installer invocation, fixes #267
It came to the attention in #267 that some of the improvements in Magerun 1
when installing Magento were not yet forward ported to Magerun 2.

Fixes in detail:

- Use the same php binary as Magerun is running with (solves the issue
  with aliasing the php binary as reported in #267)

- Using Exec::run() utility (solves the issue of not showing the error
  output if the install command fails as reported in #267)

- When invoking the command, PHP is executed with full error reporting so
  that errors during the install can be more easily trouble-shooted

Refs:

- #267

- Command: install

@ktomk ktomk closed this in db5e96b Feb 11, 2017

cmuench added a commit to cmuench/n98-magerun2 that referenced this issue Oct 11, 2017

Forward port Magento installer invocation, fixes #267
It came to the attention in #267 that some of the improvements in Magerun 1
when installing Magento were not yet forward ported to Magerun 2.

Fixes in detail:

- Use the same php binary as Magerun is running with (solves the issue
  with aliasing the php binary as reported in #267)

- Using Exec::run() utility (solves the issue of not showing the error
  output if the install command fails as reported in #267)

- When invoking the command, PHP is executed with full error reporting so
  that errors during the install can be more easily trouble-shooted

Refs:

- #267

- Command: install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment