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.
1 Answer 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 .
-
I guess composer does not work with windows. I get
Could not open input file: C:/Program Files/Git/usr/local/bin/composerBlack– Black2020年01月30日 11:56:44 +00:00Commented Jan 30, 2020 at 11:56 -
upgraded my answerYlgen Guxholli– Ylgen Guxholli2020年01月30日 11:57:19 +00:00Commented Jan 30, 2020 at 11:57
-
which composershows/c/ProgramData/ComposerSetup/bin/composerBlack– Black2020年01月30日 11:57:49 +00:00Commented Jan 30, 2020 at 11:57 -
try to replace this /usr/local/bin/composer with this /c/ProgramData/ComposerSetup/bin/composerYlgen Guxholli– Ylgen Guxholli2020年01月30日 11:59:06 +00:00Commented Jan 30, 2020 at 11:59
-
Im not sure where to find
/usr/local/bin/composerBlack– Black2020年01月30日 12:00:23 +00:00Commented Jan 30, 2020 at 12:00
Explore related questions
See similar questions with these tags.