1Fatal error: Allowed memory size of 1610612736 bytes exhausted
2
3export COMPOSER_MEMORY_LIMIT=-1
4and restart composer update
5
1php --ini
2
3nano /etc/php5/cli/php.ini (it could be different for you)
4
5Search for memory_limit by (ctrl + w)
6
7make memory_limit to -1 or 2G (depending on what you can increase to)
8
9save by (ctrl + x) then enter
10
1
2A quick solution for memory limit in Magento 2 command is directly adding memory limit inside command.
3
4For Compilation command,
5
6php -dmemory_limit=5G bin/magento setup:di:compile
7For Deployment
8
9php -dmemory_limit=5G bin/magento setup:static-content:deploy