问题
In server when I try update packages
composer install --no-dev
Result is
How can I fix it?
回答1:
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.
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.
If you can't do this, you need to more memory on your server - either enable swap or buy server with more RAM.
来源:https://stackoverflow.com/questions/52026362/server-composer-install-no-dev-killed