composer-error-about-memory-exhausted

安装 composer 包时候报错:

composer require knplabs/github-api php-http/guzzle6-adapter "^1.1"

Using version ^2.14 for knplabs/github-api
./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/Cellar/composer/1.9.2/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223

Composer 文章中给出的解决办法如下,尝试了一下貌似不行。

https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors