近期用命令composer require phpoffice/phpspreadsheet安装phpspreadsheet时出现内存不足问题,出现如下错误:
The following exception is caused by a lack of memory or swap, or not having swap configured
用以下方法完美解决:
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 sudo /sbin/mkswap /var/swap.1 sudo /sbin/swapon /var/swap.1