php - Composer 在 Vagrant 中更新 `The following exception is caused by a lack of memory and not having swap configured`错误

标签 php memory vagrant composer-php virtualbox

我在 Vagrant 的VirtualBox环境中安装了带有 Composer 的php5.5。

当我尝试任何 Composer 的命令时,以下错误随机出现:
The following exception is caused by a lack of memory and not having swap configured
我该如何解决?

最佳答案

修复它不是一个错误-要启用交换,您可以使用例如:

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

引用:https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors

希望它能对您有所帮助:)

关于php - Composer 在 Vagrant 中更新 `The following exception is caused by a lack of memory and not having swap configured`错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38828224/

相关文章:

php生成的安全码图片

iphone - 为什么 UIWebView 吃这么多内存?

postgresql - 删除postgresql中的临时文件

vagrant - 如何将 NAT 接口(interface)添加为 eth1 而不是 eth0

linux - 如何将 docker 镜像指向我的 .m2 目录,以便在 mac 上的 docker 中运行 maven?

php - 如何在嵌套管理中执行内联编辑?

php - 正则表达式 : Matching phone numbers starting with NNN and having 10 numbers

php - 有人使用 dhtmlxcombo 插件向我解释了这段 jQuery 代码的一部分

c++ - 静态数组与动态数组的 C/C++ 性能

vagrant puppetlabs-mysql Mysql_grant 失败