swap 跑满了

composer安装 overtrue/laravel-wechat:~4.0 报错

vagrant@homestead:~/code/larabbs1.test$ composer require "overtrue/laravel-wechat:~4.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 9 installs, 0 updates, 0 removals
  - Installing easywechat-composer/easywechat-composer (1.1.4): Downloading (conDownloading (100%)
    proc_open(): fork failed - Cannot allocate memory
    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
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
  [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>]...

根据提供的链接,https://getcomposer.org/doc/articles/troub...
执行 free -m

vagrant@homestead:~/code/larabbs1.test$ free -m
              total        used        free      shared  buff/cache   available
Mem:           1993         816         921          62         255         955
Swap:           979         977           2

用满了,然后根据链接里面提供的命令,创建新的交换分区文件,扩大交换分区。
需要注意的一点,重启homestead之后这个交换分区文件的挂载就消失了,重新执行链接里面的命令

/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 1

那就不在homestead里面composer require吧,直接在本机composer require

6年前 评论

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