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
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 1

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

4年前 评论

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