服务器作曲家安装 --no-dev 被杀 [英] Server composer install --no-dev killed

查看:25
本文介绍了服务器作曲家安装 --no-dev 被杀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试更新包时在服务器中

In server when I try update packages

composer install --no-dev

结果是

我该如何解决?

推荐答案

看起来 composer install 正在尝试更新包,所以你可能没有 composer.lock 项目中的文件.在这种情况下,composer install 就像 composer update 一样需要大量内存.您的服务器可能没有足够的内存并且进程被操作系统杀死.

It looks like composer install is trying to update packages, so you probably does not have composer.lock file in your project. In that case composer install works like composer update which requires a lot of memory. Your server probably does not have enough memory and process gets killed by OS.

解决这个问题的最简单方法是在开发环境中生成 composer.lock,将其提交到项目中,然后使用 composer install 在项目的服务器上运行 composer install代码>composer.lock.从 composer.lock 安装依赖项很便宜,所以不应该有任何与内存相关的问题.

The easiest way of solving this would be to generate composer.lock on dev environment, commit it into project, and then run composer install on server on project with composer.lock. Installing dependencies from composer.lock is cheap, so there should not be any memory-related problems.

如果您无法做到这一点,则需要在服务器上增加内存 - 启用交换或购买具有更多 RAM 的服务器.

If you can't do this, you need to more memory on your server - either enable swap or buy server with more RAM.

这篇关于服务器作曲家安装 --no-dev 被杀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆