title: How to solve this error on live server for laravel?
body: <p>I have installed this package success locally <code>composer require spatie/laravel-image-optimizer</code>, but when I tried to install on the live server I got this errors</p>
  
  <pre><code>no@zz607:/var/www/html$  composer require spatie/laravel-image- 
  optimizer
  Using version ^1.4 for spatie/laravel-image-optimizer
  ./composer.json has been updated
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  
  mmap() failed: [12] Cannot allocate memory
  
  mmap() failed: [12] Cannot allocate memory
  
  mmap() failed: [12] Cannot allocate memory
  PHP Fatal error:  Out of memory (allocated 544395264) (tried to 
  allocate 20480 bytes) in 
  /usr/share/php/Composer/Repository/ComposerRepository.php on line 321
  
  Fatal error: Out of memory (allocated 544395264) (tried to allocate 
   20480 bytes) in 
   /usr/share/php/Composer/Repository/ComposerRepository.php on line 321
  </code></pre>
  
  <p>server info 
  <a href="https://i.stack.imgur.com/RrVrU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RrVrU.png" alt="enter image description here"></a></p>