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>]...
懒惰的大叔
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 1

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

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