composer install时包内存益处

2020-08-07  本文已影响0人  PENG先森_晓宇

安装 jwt-auth 包时,一直提示内存不足,即使我已经将 php.ini 的内存扩大到了 1G,也没用

$ composer require tymon/jwt-auth
Using version ^1.0 for tymon/jwt-auth
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.%

解决方案

$ php -d memory_limit=-1 /usr/local/bin/composer require tymon/jwt-auth
上一篇 下一篇

猜你喜欢

热点阅读