Composer killed while updating

后端 未结 16 1802
野性不改
野性不改 2020-11-28 19:40

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          


        
相关标签:
16条回答
  • 2020-11-28 19:58

    Solved on Laravel/Homestead (Vagrant Windows)

    1. Edit Homestead.yaml and increase memory from 2048 to 4096

    2. vagrant up

    3. vagrant ssh

    4. Install Symfony with this line on the folder you choose (must be without files)

      COMPOSER_MEMORY_LIMIT=-1 composer create-project symfony/website-skeleton . -s dev
      
    0 讨论(0)
  • 2020-11-28 20:04

    Fix for AWS ec2 Ubuntu Server Php Memory Value Upgrade For Magento 2.3.X

    • Php 7.2 / 7.3
    • nginx
    • ubuntu
    • composer 1.X
    • mariaDB
    • magento 2.3.X

    Error : Updating dependencies (including require-dev) Killed for

    1. Ram Must at least 4GB
    2. Change instance type to suitable or Upgrade Ram
    3. Php Memory Value change
    4. Server Restart
    5. Try to install the same package again

    PHP value update may locate under '/etc/php/7.2/fpm/php.ini' depend on your server and PHP fpm X.XX version

    Using Seed command 'change as your server requires' on my case >> /etc/php/7.2/fpm/php.ini

    memory limit type as "3.5G" or "3500MB" Php 7.2.X

    sudo sed -i "s/memory_limit = .*/memory_limit = 3.5G/" /etc/php/7.2/fpm/php.ini
      
    

    Php 7.3.X

      sudo sed -i "s/memory_limit = .*/memory_limit = 3.5G/" /etc/php/7.3/fpm/php.ini
    

    Test if applied on 'free -h' command

        free -h
    

    Install-Package Again#

    Install extension via Composer

    go to your Magento 2 installation directory

    cd /var/www/html/
    

    with 'superuser' privileges

    sudo su
    

    Start installation

    composer require XXXXXX/XXXXXXX
    

    Enable Module s

    php bin/magento module:enable XXXXXX/XXXXXXX
    
    
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    
    Restart
    
    sudo reboot
    

    Enjioy

    0 讨论(0)
  • 2020-11-28 20:06

    DigitalOcean fix that does not require extra memory - activating swap, here is an example for 1gb:

    in terminal run below

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

    The above solution will work until the next reboot, after that the swap would have to be reactivated. To persist it between the reboots add the swap file to fstab:

    sudo nano /etc/fstab
    

    open the above file add add below line to the file

    /var/swap.1 swap swap sw 0 0
    

    now restart the server. Composer require works fine.

    0 讨论(0)
  • 2020-11-28 20:07

    php -d memory_limit=5G composer.phar update

    0 讨论(0)
提交回复
热议问题