Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
composer require dusterio/lumen-passport
PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...>
1.查找内存限制:
php -r "echo ini_get('memory_limit').PHP_EOL;"
128M;
2. 定位 php.ini file, 修改
memory_limit = 512M;
3. After saving the file, we can see our memory has increased.
php -r "echo ini_get('memory_limit').PHP_EOL;"
发现改 Mamp 下的 PHP ini 不好使, 改 mac 系统的 php, 之前是自带的 7.1.23, 更新一下
-
brew install php 更新 PHP
-
使用一下命令, 找到 mac php.ini
php -i | grep "php.ini"
然后修改memory_limit, 然后重启