Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento installation failed [/vagrant/scripts/guest/m-reinstall] #206

Open
efmitchell opened this issue Oct 7, 2018 · 1 comment
Open

Comments

@efmitchell
Copy link

Mac OS 10.13.1, all listed requirements installed.

Whilst running init_project, get the error:

 Magento installation failed. [/vagrant/scripts/guest/m-reinstall]
[2018-10-07 11:11:36] >  PHP Parse error:  syntax error, unexpected '?', expecting variable (T_VARIABLE) in /Users/elliotmitchell/Code/vagrant-magento/magento2ce/lib/internal/Magento/Framework/Filesystem/Directory/Write.php on line

When I run with error logging I also get the below in the m-reinstall log:

`2018-10-07 12:11:33] STATUS: Deleting TestModule directories �[/Users/elliotmitchell/Code/vagrant-magento/scripts/host/m_reinstall.sh]]
[2018-10-07 11:11:35] STATUS: Killing MQ processes �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 11:11:35] STATUS: Installing/re-installing Magento �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 11:11:35] STATUS: > Removing Magento configuration files (env.php and config.php) �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 11:11:35] STATUS: > Clearing Magento cache �[/vagrant/scripts/guest/m-clear-cache]]
[2018-10-07 11:11:35] STATUS: > Clearing directories containing temporary files �[/vagrant/scripts/guest/m-clear-cache]]
[2018-10-07 11:11:35] STATUS: > Dropping and creating 'magento' DB �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 11:11:35] STATUS: > Dropping and creating 'magento_integration_tests' DB �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 11:11:35] STATUS: > ./bin/magento setup:install --db-host=localhost --db-name=magento --db-user=root --backend-frontname=admin --base-url=http://magento2.vagrant220/ --language=en_US --timezone=America/Chicago --currency=USD --admin-lastname=Admin --admin-firstname=Admin --admin-email=[email protected] --admin-user=admin --admin-password=123123q --cleanup-database --use-rewrites=1 --amqp-host=localhost --amqp-port=5672 --amqp-user=guest --amqp-virtualhost=/ --amqp-password=guest �[/vagrant/scripts/guest/m-reinstall]]

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /Users/elliotmitchell/Code/vagrant-magento/magento2ce/lib/internal/Magento/Framework/Filesystem/Directory/Write.php on line 35
[2018-10-07 11:11:36] ERROR: > Magento installation failed. �[/vagrant/scripts/guest/m-reinstall]]
[2018-10-07 12:11:36] INFO: > �[mSee details in �/Users/elliotmitchell/Code/vagrant-magento/log/m-reinstall.log�[m. For debug output set �debug:vagrant_project�[m to �1�[m in �etc/config.yaml�[m �[./m-reinstall]]
[2018-10-07 12:11:36] ERROR: > ++ which bash

  • /bin/bash /Users/elliotmitchell/Code/vagrant-magento/scripts/host/m_reinstall.sh
    ++ logError
    ++ [[ -n '' ]]
    +++ cat
    ++ input=
    ++ [[ -n '' ]] �[Unknown source file]]
    error: ++ which bash
  • /bin/bash /Users/elliotmitchell/Code/vagrant-magento/scripts/host/m_reinstall.sh
    ++ logError
    ++ [[ -n '' ]]
    +++ cat
    ++ input=
    ++ [[ -n '' ]]`

Phpstorm isn't running as yet.

@elburro1887
Copy link

I'm also getting this error. This is due to the following line

https://github.com/magento/magento2/blob/80469a61e061abd0001c93497a6d92296b46496b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php#L35

It uses a new feature called "nullable types", which was apparently introduced in PHP 7.1

The installer only installs PHP 7.0 by default, so you need to change this to PHP 7.1

https://github.com/paliarush/magento2-vagrant-for-developers#switch-between-php-versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants