今天爱分享给大家带来PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted【解决方法】,希望能够帮助到大家。
composer update安装package时,出现以下报错,内存不足
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83 Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83 Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
解决办法1:运行命令时增大内存
php -d memory_limit=3G /usr/local/bin/composer update
解决办法2:不限制内存大小
php -d memory_limit=-1 /usr/local/bin/composer update
解决办法3:把php.ini的memery_limit增大
memery_limit=4096M