-2

When I run the Laravel project via php artisan serve I get an error about /vendor/autoload.php as no such file or directiory in /artisan. Then after I did couple of research I found that composer does not exist. Hence, I tried to update composer via composer update I get an error about the memory limit as such:

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/local/Cellar/composer/1.10.7/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223

And then I try to increase the memory to make the memory infinite with the command php -d memory_limit=-1 but then, terminal is not giving me a response. I cloned the project through git and there is no .env file in my project. How can I solve the problem?

When I run composer install I get the errors below.

Problem 1 - Installation request for laravel/horizon v4.3.3 -> satisfiable by laravel/horizon[v4.3.3]. - laravel/horizon v4.3.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.

Problem 2 - Installation request for phpoffice/phpspreadsheet 1.13.0 -> satisfiable by phpoffice/phpspreadsheet[1.13.0]. - phpoffice/phpspreadsheet 1.13.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.

Problem 3 - phpoffice/phpspreadsheet 1.13.0 requires ext-zip * -> the requested PHP extension zip is missing from your system. - maatwebsite/excel 3.1.19 requires phpoffice/phpspreadsheet ^1.10 -> satisfiable by phpoffice/phpspreadsheet[1.13.0]. - Installation request for maatwebsite/excel 3.1.19 -> satisfiable by maatwebsite/excel[3.1.19].

  • 1
    Does this answer your question? [Composer Memory Limit](https://stackoverflow.com/questions/49539512/composer-memory-limit) – Nico Haase Jun 26 '20 at 12:56
  • Additionally, please do not randomly run `composer update` - this will change the versions of packages to be installed. Usually, you should run `composer install` unless you know **why** you run `composer update` – Nico Haase Jun 26 '20 at 12:57
  • **composer install** does not work too. – Barış Ertaş Jun 26 '20 at 13:02
  • 1
    According to the error message you've posted, it's pretty clear why `composer install` does not succeed. Please read them and install and activate the missing extensions – Nico Haase Jun 26 '20 at 13:05

2 Answers2

1

Did you try with the information listed over here

You can also try this command php -d memory_limit=-1 $(which composer) update

You may wanna check this topic aswell

Also

I had to combine COMPOSER_MEMORY_LIMIT and memory_limit in the command line:

On Windows:

set COMPOSER_MEMORY_LIMIT=99999999999&& php -d memory_limit=-1 composer.phar update

On Linux:

export COMPOSER_MEMORY_LIMIT=99999999999 && php -d memory_limit=-1 composer.phar update
Kristian Vasilev
  • 504
  • 8
  • 26
-1

This is the command that solves all problems I mentioned above.

composer install --ignore-platform-reqs