composer update でメモリエラー

composer update でメモリエラー

composer update コマンドを実行すると、メモリオーバーのエラーが出た。
その時の解消法です。

事象

# composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)

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 84

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

解消法

メモリリミット制限をオフにする

COMPOSER_MEMORY_LIMIT=-1 $(which composer) update

参考サイト

Web技術カテゴリの最新記事