0

I try to install magento 2 via composer.

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

But I get "out of memory". I have 16 GB RAM.

So I restarted windows and tried again directly after restart without any programs open, but it still throws this error.

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 64 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Rule2Literals.php on line 53

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

asked Jan 30, 2020 at 11:48

1 Answer 1

1

Try with this command

php -d memory_limit=-1 /usr/local/bin/composer create-project --repository=https://repo.magento.com/ magento/project-community-edition --ignore-platform-reqs .

usually the path of composer is here:

/usr/local/bin/composer

If you are having problems with composer path , run the command below to find which path is the composer :

which composer

In your case should be :

php -d memory_limit=-1 /c/ProgramData/ComposerSetup/bin/composer create-project --repository=repo.magento.com magento/project-community-edition --ignore-platform-reqs .

answered Jan 30, 2020 at 11:54
9
  • I guess composer does not work with windows. I get Could not open input file: C:/Program Files/Git/usr/local/bin/composer Commented Jan 30, 2020 at 11:56
  • upgraded my answer Commented Jan 30, 2020 at 11:57
  • which composer shows /c/ProgramData/ComposerSetup/bin/composer Commented Jan 30, 2020 at 11:57
  • try to replace this /usr/local/bin/composer with this /c/ProgramData/ComposerSetup/bin/composer Commented Jan 30, 2020 at 11:59
  • Im not sure where to find /usr/local/bin/composer Commented Jan 30, 2020 at 12:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.