Home > Article > Development Tools > What should I do if composer runs out of memory? Two step solution!
This article is written by the tutorial column of composer to introduce to you the problem of insufficient memory in composer. I hope it will be helpful to friends in need!
composer Insufficient memory?
The error message is as follows
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223 Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223 Check getcomposer.org/doc/article… for more info on how to handle out of memory errors.#Cause Insufficient memory
Solution
1. Modify php.ini2. Temporarily release the memory limit when executing composerCOMPOSER_MEMORY_LIMIT =-1 composer require "package name"
The above is the detailed content of What should I do if composer runs out of memory? Two step solution!. For more information, please follow other related articles on the PHP Chinese website!