Windows 10 下使用 composer require 时 Fatal error: Allowed memory size
在 Windows 10 执行 >composer require jenssegers/agent
出现如下内存不足的错误:
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 655360 b
ytes) in phar://C:/composer/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.p
hp on line 49
解决方法:
更改 php.init 文件里的 memory_limit 的值,更改后为 memory_limit=-1
表示不限制内存使用。
重启 web 服务。