首页 >开发工具 >composer >composer 内存不足怎么办?两步解决!

composer 内存不足怎么办?两步解决!

藏色散人
藏色散人转载
2021-11-17 14:28:042771浏览

本文由composer教程栏目给大家介绍关于composer 内存不足问题,希望对需要的朋友有所帮助!

composer 内存不足怎么办?两步解决!

composer 内存不足?

报错信息如下

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.

####原因 内存不足

解决方法

1.修改php.ini

2.执行composer时临时放开内存限制

COMPOSER_MEMORY_LIMIT=-1 composer require "package name"

以上是composer 内存不足怎么办?两步解决!的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文转载于:juejin.im。如有侵权,请联系admin@php.cn删除