I got this error when running composer.phar update on my VM:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried t
php -d memory_limit=-1 /usr/local/bin/composer update --no-scripts
memory_limit=-1 is for unlimited memory for this process
when you add php before the composer for unlimited memory then you have to give composer complete path where its installed on server (for ubntu) its /usr/local/bin/composer
Reamining part is just compoer commands update/install