• <small id='GUCpe'></small><noframes id='GUCpe'>

    1. <legend id='GUCpe'><style id='GUCpe'><dir id='GUCpe'><q id='GUCpe'></q></dir></style></legend>
        <bdo id='GUCpe'></bdo><ul id='GUCpe'></ul>

      1. <i id='GUCpe'><tr id='GUCpe'><dt id='GUCpe'><q id='GUCpe'><span id='GUCpe'><b id='GUCpe'><form id='GUCpe'><ins id='GUCpe'></ins><ul id='GUCpe'></ul><sub id='GUCpe'></sub></form><legend id='GUCpe'></legend><bdo id='GUCpe'><pre id='GUCpe'><center id='GUCpe'></center></pre></bdo></b><th id='GUCpe'></th></span></q></dt></tr></i><div id='GUCpe'><tfoot id='GUCpe'></tfoot><dl id='GUCpe'><fieldset id='GUCpe'></fieldset></dl></div>
      2. <tfoot id='GUCpe'></tfoot>

        更新时作曲家被杀

        Composer killed while updating(更新时作曲家被杀)

            <tbody id='ez02l'></tbody>
          <tfoot id='ez02l'></tfoot>
        1. <legend id='ez02l'><style id='ez02l'><dir id='ez02l'><q id='ez02l'></q></dir></style></legend>

            <small id='ez02l'></small><noframes id='ez02l'>

              <i id='ez02l'><tr id='ez02l'><dt id='ez02l'><q id='ez02l'><span id='ez02l'><b id='ez02l'><form id='ez02l'><ins id='ez02l'></ins><ul id='ez02l'></ul><sub id='ez02l'></sub></form><legend id='ez02l'></legend><bdo id='ez02l'><pre id='ez02l'><center id='ez02l'></center></pre></bdo></b><th id='ez02l'></th></span></q></dt></tr></i><div id='ez02l'><tfoot id='ez02l'></tfoot><dl id='ez02l'><fieldset id='ez02l'></fieldset></dl></div>
                <bdo id='ez02l'></bdo><ul id='ez02l'></ul>

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

                  问题描述

                  我遇到了一个问题,我试图在我的 Laravel 4 项目中安装一个新包.但是当我运行 php composer.phar update 我得到这个:

                  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
                  

                  我在 Internet 上查找了问题,发现内存是问题,我认为我没有足够的 RAM 可用,我检查了这个我有大约 411mb 可用空间.composer 真的需要更多内存吗?

                  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?

                  推荐答案

                  被杀"消息通常意味着您的进程消耗了太多内存,因此您可能只需要在可能的情况下向系统添加更多内存.在撰写此答案时,我必须将虚拟机的内存增加到至少 768MB,以使 composer update 在某些情况下正常工作.

                  The "Killed" message usually means your process consumed too much memory, so you may simply need to add more memory to your system if possible. At the time of writing this answer, I've had to increase my virtual machine's memory to at least 768MB in order to get composer update to work in some situations.

                  但是,如果您在实时服务器上执行此操作,则根本不应该使用 composer update.你应该做的是:

                  However, if you're doing this on a live server, you shouldn't be using composer update at all. What you should instead do is:

                  1. 在内存限制不那么严重的本地环境中运行 composer update.
                  2. 上传或git push composer.lock 文件.
                  3. 在实时服务器上运行 composer install.
                  1. Run composer update in a local environment (such as directly on your physical laptop/desktop, or a docker container/VM running on your laptop/desktop) where memory limitations shouldn't be as severe.
                  2. Upload or git push the composer.lock file.
                  3. Run composer install on the live server.

                  composer install 然后将从 .lock 文件中读取,每次都获取完全相同的版本,而不是查找每个包的最新版本.这会降低您的应用崩溃的可能性,并且 composer 使用更少的内存.

                  composer install will then 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.

                  在此处阅读更多信息:https://getcomposer.org/doc/01-basic-usage.md#installing-with-composer-lock

                  或者,您可以将整个 vendor 目录上传到服务器,完全无需运行 composer install,但是您应该 运行 composer dump-autoload --optimize.

                  Alternatively, you can upload the entire vendor directory to the server, bypassing the need to run composer install at all, but then you should run composer dump-autoload --optimize.

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Laravel 4 - Connect to other database(Laravel 4 - 连接到其他数据库)
                  Call external API function from controller, LARAVEL 4(从控制器调用外部 API 函数,LARAVEL 4)
                  Empty string instead of null values Eloquent(空字符串而不是空值 Eloquent)
                  quot;laravel.logquot; could not be opened: failed to open stream(“laravel.log无法打开:无法打开流)
                  Displaying the Error Messages in Laravel after being Redirected from controller(从控制器重定向后在 Laravel 中显示错误消息)
                  Laravel Creating Dynamic Routes to controllers from Mysql database(Laravel 从 Mysql 数据库创建到控制器的动态路由)
                1. <i id='22wIp'><tr id='22wIp'><dt id='22wIp'><q id='22wIp'><span id='22wIp'><b id='22wIp'><form id='22wIp'><ins id='22wIp'></ins><ul id='22wIp'></ul><sub id='22wIp'></sub></form><legend id='22wIp'></legend><bdo id='22wIp'><pre id='22wIp'><center id='22wIp'></center></pre></bdo></b><th id='22wIp'></th></span></q></dt></tr></i><div id='22wIp'><tfoot id='22wIp'></tfoot><dl id='22wIp'><fieldset id='22wIp'></fieldset></dl></div>
                    <tbody id='22wIp'></tbody>
                  <tfoot id='22wIp'></tfoot>
                  • <bdo id='22wIp'></bdo><ul id='22wIp'></ul>

                    <small id='22wIp'></small><noframes id='22wIp'>

                          <legend id='22wIp'><style id='22wIp'><dir id='22wIp'><q id='22wIp'></q></dir></style></legend>