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

0 votes

I got a problem, I tried to install a new package to my Laravel 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?

Aug 4, 2020 in Laravel by kartik
• 37,520 points
8,123 views

1 answer to this question.

0 votes

Hello @kartik,

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.

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. 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 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.

Hope this is helpfull!

Thank you!!

answered Aug 4, 2020 by Niroj
• 82,840 points

Related Questions In Laravel

0 votes
1 answer

Error:Laravel [InvalidArgumentException] Script “post-install-cmd” is not defined in this package

Hello @kartik, Do composer global update before laravel new <project-name> and you'll ...READ MORE

answered Apr 6, 2020 in Laravel by Niroj
• 82,840 points
1,490 views
0 votes
1 answer

Error:Swift_TransportException Expected response code 220 but got code "", with message ""

Hello @kartik, This problem can generally occur when ...READ MORE

answered Jul 30, 2020 in Laravel by Niroj
• 82,840 points
4,365 views
0 votes
2 answers
0 votes
1 answer

Error: reverting ./composer.json to its original content

Hello @kartik, I used to use this: composer require ...READ MORE

answered Sep 11, 2020 in Laravel by Niroj
• 82,840 points
3,519 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,012 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
2,994 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,918 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
44,686 views
0 votes
2 answers

Error:Laravel Installation failed, reverting ./composer.json to its original content.?

Hello, You need to install php zip extension. Something ...READ MORE

answered Mar 26, 2020 in Laravel by Niroj
• 82,840 points
88,783 views
0 votes
1 answer

Error:Composer Out of memory in Laravel?

Hey @kartik, This Error  happens in almost all ...READ MORE

answered Mar 30, 2020 in Laravel by Niroj
• 82,840 points
9,692 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP