Composer 的时候报错?怎么解决?

composer的时候报这个错误,怎么解决?

vagrant@homestead:~/code/larabbs$ composer require "overtrue/laravel-lang:~3.0"
    1/3:    https://php.cnpkg.org/p/provider-latest$0cf23fb061a08bdd7bb13fc1b3069485569a268a3e25e5c10e865026ad4f0891.json
    2/3:    https://php.cnpkg.org/p/provider-2020-01$bc61e47ee233be058dfeb1810bb1977401ee1c15b7a85f9095a642640afbd3ec.json
    3/3:    https://php.cnpkg.org/p/provider-2019-04$74223b2599a6cb836c7dd71754d159f31823bf129cc4c4f373a76ec5e999ac42.json
    Finished: success: 3, skipped: 0, failure: 0, total: 3
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing caouecs/laravel-lang (4.0.9): 
Installation failed, reverting ./composer.json to its original content.
The following exception is caused by a lack of memory or swap, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details

PHP Warning:  proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 952

Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 952

  [ErrorException]                                   
  proc_open(): fork failed - Cannot allocate memory  

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
懒惰的大叔
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 1

内存不足了,可能你的机子内存过低?

4年前 评论
懒惰的大叔 (楼主) 4年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!