最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Composer PHP Fatal error:Allowed memory size of
时间:2022-06-24 23:18:53 编辑:袖梨 来源:一聚教程网
今天在运行composer update时遇到的,详细的错误消息如下:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted
(tried to allocate 32 bytes) in phar:///usr/local/Cellar/composer/
1.0.0-alpha8/libexec/composer.phar/src/Composer/DependencyResolver/
Rule.php on line 62
Fatal error: Allowed memory size of 536870912 bytes exhausted
(tried to allocate 32 bytes) in phar:///usr/local/Cellar/composer/
1.0.0-alpha8/libexec/composer.phar/src/Composer/DependencyResolver/
Rule.php on line 62
一直以为是网络原因,最近连接国外的网络不是很稳定,后来根据报错的信息Allowed memory size of 536870912 bytes exhausted提示知道可能是内存分配不够,大家知道在PHP的配置文件php.ini中有限制脚本运行内存的设置memory_limit把这个值调大一些就可以解决这个问题了。
memory_limit = 1G
当然大家也许不喜欢随随便便的改动配置文件php.ini,在帖子《Composer update runs out of memory #1898》Dynom给出了个临时的解决办法:
php -dmemory_limit=1G composer.phar update
相关文章
- 四海兄弟故乡地图怎么自由探索 地图自由探索玩法介绍 08-18
- 四海兄弟故乡刀有哪些 刀的使用方法介绍 08-18
- 诛仙2殷殷期许奇遇怎么做 殷殷期许学府奇遇攻略 08-18
- 超级机器人大战Y什么时候出 正式版发布时间分享 08-18
- 诛仙2上古遗迹奇遇坐标是什么 上古遗迹学府奇遇攻略 08-18
- 诛仙2互助邮驿奇遇在哪 互助邮驿学府奇遇完成方法 08-18