Composer killed while updating

后端 未结 16 1965
野性不改
野性不改 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 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.

提交回复
热议问题