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
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
最佳答案

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

5年前 评论
讨论数量: 5

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

5年前 评论

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

5年前 评论

一般小的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年前

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