Laravel 17 May, 2021 15:05

Fix lỗi overload composer install || composer update

Chắc nhiều anh em dev mới sử dụng frameword thường sẽ hay bị lỗi này khi...

Chắc nhiều anh em dev mới sử dụng frameword thường sẽ hay bị lỗi này khi chạy lênh composer

nguyentinh@computer ~/Sites/my/laravel-wordpress-cms/src (develop)
└─ $ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/Cellar/composer/1.10.10/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 84

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/Cellar/composer/1.10.10/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 errors.

Dưới đây là cách fix cho anh em

Cách 1: thêm COMPOSER_MEMORY_LIMIT=-1 phía trước lệnh

COMPOSER_MEMORY_LIMIT=-1 composer install
COMPOSER_MEMORY_LIMIT=-1 composer update

Leave a reply

Your email address will not be published. Required fields are marked *

0 comments