PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

Ejecutando

composer update

en una máquina virtual Linux (Laravel Homestead), obtengo este error:

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

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

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
Continue reading «PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted»

Instalar Composer de forma global en Debian

Para instalar Composer de forma global en Debian hay que ejecutar

$ sudo apt-get update && apt-get install curl php5-cli
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Para comprobar que funciona de forma global, hay que ejecutar

$ composer

y comprobar que su salida es similar a la siguiente.

______
 / ____/___ ____ ___ ____ ____ ________ _____
 / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
 / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
 \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
 /_/
 Composer version 1.0-dev (c0883d85fa9e1b1b1bfb42e02261d55cdfd5af20) 2016-02-25 15:44:15
Usage:
 command [options] [arguments]