0

I am try to install barcode package in my cpanel laravel project.But every time it gets killed.

command:

[......@host public_html]$ composer require milon/barcode

after few moment:

Using version ^7.0 for milon/barcode
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/symfony/polyfill-iconv%24535e139d88ce6708c9d8bf795da669c3fe46467f4bc7dc900e2e65a8d77b56ae.json" file could not be downloaded: failed to open stream: Network is unreachable
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Killed

it also happening for all the packages I want to install like:pdf or others.Updated my composer.still not working.

Sharif Ahmed
  • 160
  • 2
  • 14
  • 2
    [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. i copy from this response](https://stackoverflow.com/a/20699258/13981490) – Songoudaha Gabeta Soro Jul 23 '20 at 09:50
  • Does this answer your question? [Composer killed while updating](https://stackoverflow.com/questions/20667761/composer-killed-while-updating) – Nico Haase Jul 23 '20 at 10:22
  • Generally, you should avoid running `composer require` on your server. Run it on your development system which might use more memory – Nico Haase Jul 23 '20 at 10:22
  • then what should be my command? without composer require @NicoHaase – Sharif Ahmed Jul 23 '20 at 10:39
  • You need `composer require` to install a new package, but you should not run it on any external server – Nico Haase Jul 23 '20 at 11:30

1 Answers1

1

It happens for a lack of memory of your server. You can install the package in your local machine then replace your server composer.lock file with the local's composer.lock file Then go to the terminal and run composer update.

Sharif Ahmed
  • 160
  • 2
  • 14