[Composer] [Laravel] What to do if you cannot install due to insufficient memory

Overview

An error occurred when installing Laravel Breeze using Composer.

Command executed

composer require laravel/breeze --dev

The error returned

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

environment

Laravel Framework 8.20.1 Docker version 20.10.0 Composer version 1.10.19

Details of this error

Solutions

Command executed

php -d memory_limit=-1 /usr/bin/composer require laravel/breeze --dev

By setting -d memory_limit = -1, it seems that commands can be executed with unlimited memory.

It was also mentioned in composer troubleshooting. Memory limit errors

Summary

It seems that it can be supported even if you create php.ini in the directory where the docker file of the php container is located and rewrite the setting

php.ini


memory_limit = -1

Recommended Posts

[Composer] [Laravel] What to do if you cannot install due to insufficient memory
What to do if you install Ubuntu
What to do if you get angry with OpenSSL with pyenv install
What to do if you cannot roll back the migration (UnknownMigrationVersionError)
What to do if you can't install the plugin from the Eclipse marketplace
What to do if you push incorrect information
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if you accidentally create a model
What to do if you cannot execute with the command "Java package name / class name"
What to do if you get a java.io.IOException in GlassFish
# What to do if you accidentally do rails db: migrate: drop
What to do if the adb command cannot be executed
What to do if mysql2 gets a bundle install error
What to do if you can't use the rails command
[Java] [Spring] What to do if you cannot Autowire with Type Mismatch after annotating Spring Security
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
What to do after Vagrant install
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you forget the root password in CentOS7
[Rails] What to do if you can't get parameters with form_with
What to do if you go offline due to SSL certificate error when running Jenkins on Mac
What to do if JavaMail cannot be used with OpenJDK 11 or later
Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error
What to do if you get an error during rails db: reset
What to do if you get an uninitialized constant Likes Controller error
What to do if an error occurs when nokogiri enters when bundle install
What to do if you don't like the code generated by swagger-codegen-cli
What to do if you get an error when you hit Heroku logs
What to do if you get a MiniMagick vulnerability alert on GitHub
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
What to do if you can't bundle update and bundle install after installing Ruby 3.0.0 in the Rails tutorial
What to do if you get a SQLite3 :: BusyException: database is locked error
What to do if you get Could not locate Gemfile or .bundle / directory
What to do if you can't activate the select box created by bootstrap-select
What to do if you get the error message unrecognized selector send to instance "***"
What to do if the server tomcat dies
What to do if you have enabled Use the WSL2 based engine in Docker Desktop with insufficient WSL2 installation
What to do if you have installed Java for OS X on macOS
What to do if mvn archetype: generate fails
What to do if you get an error on heroku rake db: migrate
What to do if you get angry if you don't have nokogiri while installing wp2txt
What to do if SPA URL loading cannot be detected by WebView shouldOverrideUrlLoading
What do you use when converting to String?
How to translate the error message into Japanese (What to do if you cannot log in for some reason)
[Ubuntu] What to do when MongoDB cannot be started due to a SocketException error
[Solution] What to do if you get a Docker error'ERROR: Cannot connect to the Docker daemon at unix: ///var/run/docker.sock. Is the docker daemon running?'
What to do if you get a wrong number of arguments error in binding.pry
What to do if you can't get the text of an element in Selenium
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
What to do if you get the error Couldn't find Item without an ID
What to do if you can't find your API key after deploying to Rails heroku
What to do if you get a port error when docker-compose up on Mac
What to do if the debug gem installation fails
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if rails server can't be stopped
What to do if TextToSpeech doesn't work on Android 11
What to do if an ActionController :: UnknownFormat error occurs
What to do if password authentication fails in Docker/Postgres