Fatal error: Allowed memory size of 1610612736 bytes exhausted but already allocated 1.75G
Running this command fixed it for me
php -d memory_limit=-1 /usr/local/bin/composer install
In my case with Xampp with Windows 10
i just changed:
;memory_limit=512M
by commenting this configuration, in php.ini to:
memory_limit =-1
then restart the Apache by xampp
Update Composer to version 2 and it will resolve this issue automatically.
composer self-update --2