Help us understand the problem. What is going on with this article?

Composer updateでmemory-limit-errorsになる場合の対処方法

Composer update実行時のmemory-limit-errors対象方法

エラーの内容

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in /usr/share/php/Composer/DependencyResolver/RuleSet.php on line 84

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in /usr/share/php/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 errors.[frontapps@localhost smartcity-dashboard-service]$ compCOMP

対処方法

composer updateコマンドの頭に以下のようにMemory limitの条件をつける。

COMPOSER_MEMORY_LIMIT=-1 composer update
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away