Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes)

臭大佬 2020-07-31 10:11:10 1162
php 
简介 Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Dep endencyResolver/RuleSet.php on line 84

问题

WIN10 下拉取 composer 时报如下错误。

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar://xxx/bin/composer.phar/src/Composer/Dep
endencyResolver/RuleSet.php on line 84

分析

原因是内存不够,打开 php.ini 配置文件,搜索 memory_limit 配置项,修改如下

memory_limit=-1