HTMLPurifier 下载失败?

''''''

vagrant@homestead:~/Code/LaraBBS$ composer require "mews/purifier:~2.0"
./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 ezyang/htmlpurifier (v4.10.0): Downloading (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/troub... 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] [--] []...

''''''

CaiBird008
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
最佳答案

proc_open(): 配置文件php.ini删除这个proc_open()

5年前 评论
讨论数量: 5

proc_open(): 配置文件php.ini删除这个proc_open()

5年前 评论

@ElevenRob 不是这样的,出现这个问题的原因是 elasticsearch 把内存和交换分区撑爆了,把 elasticsearch 结束就行了

4年前 评论

一般小的VPS 才1G内存,如果使用composer会提示内存不足的现象

解决办法,可以使用交换内存

直接命令

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1

4年前 评论

file

3年前 评论
aloneshen2003 3年前

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