作曲家在更新时杀死 [英] composer killed while updating

查看:247
本文介绍了作曲家在更新时杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我试图安装一个新包到我的laravel 4项目。
但是当我运行 php composer.phar update 时,我得到:

 加载包信息的composer存储库
更新依赖包(包括require-dev)
Killed


b $ b

我在互联网上找到了问题,看到内存是问题,我想我没有足够的RAM可用,我已经检查了我有约411MB免费。
作曲家真的需要更多的RAM吗? >我不得不将我的本地开发虚拟机的内存增加到768mb,以便在大多数情况下获得 composer update 。但是,如果您在实时服务器上执行此操作,则根本不应使用 composer update



您应该做的是:


  1. 在本地环境中运行 composer update

  2. 上传/ git推送composer.lock文件

  3. 在直播中运行 composer install 服务器

composer install 将从读取完全相同的.lock文件版本,而不是找到每个包的最新版本。



在这里阅读更多: https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file


I got a problem, I tried to install a new package to my laravel 4 project. But when I run php composer.phar update I get this:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed

I have looked for the problem in the internet and saw that the memory is the problem, I think I don't have enough RAM available, I've checked this I have about 411mb free. Does composer really need more RAM? Can someone help me please?

Thanks

解决方案

I've had to increase my local development virtual machine's memory to 768mb at least in order to get composer update to work in most situations. However, if you're doing this on a live server, you shouldn't be using composer update at all.

What you should do is:

  1. Run composer update in a local environment
  2. Upload/git push the composer.lock file
  3. Run composer install on the live server

composer install will read from the .lock file fetching the exact same versions every time rather than finding the latest versions of every package. This makes your app less likely to break, and composer uses less memory.

Read more here: https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file

这篇关于作曲家在更新时杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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