Preface
Today, when I used composer to update and install the expansion pack, it reported that the memory size was exceeded
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Rule2Literals.php on li
ne 53
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
Solution
First execute the composer help command to obtain the composer installation directory
composer -h
Results of the
D:\php_work\fund-admin>composer -h
Usage:
help [options] [--] [<command_name>]
Arguments:
command The command to execute
command_name The command name [default: "help"]
Options:
--xml To output help as XML
--format=FORMAT The output format (txt, xml, json, or md) [default: "txt"]
--raw To output raw command help
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--profile Display timing and memory usage information
--no-plugins Whether to disable plugins.
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
--no-cache Prevent use of the cache
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
The help command displays help for a given command:
php C:\ProgramData\ComposerSetup\bin\composer.phar help list
You can also output the help in other formats by using the --format option:
php C:\ProgramData\ComposerSetup\bin\composer.phar help --format=xml list
To display the list of available commands, please use the list command.
I can seeĀ C:\ProgramData\ComposerSetup\bin\composer.phar
my composer installation directory
At this time, the installation extension command is modified to
# php -d memory_limit=-1 php program set memory unlimited
# C:\ProgramData\ComposerSetup\bin\composer.phar composer install url
# require dcat/laravel-admin:"2.*" -vvv Loading expansion packs
php -d memory_limit=-1 C:\ProgramData\ComposerSetup\bin\composer.phar require dcat/laravel-admin:"2.*" -vvv
Read More:
- composer Error: The requested PHP extension ext-bcmath * is missing from your system. Install or enable
- Laravel-admin php artisan admin:install error reporting problem solution
- Undefined index: name error in composer [How to Solve]
- composer Error while processing content unencoding: Unknown failure within decompression softwar
- Lack of files in composer installation [How to Solve]
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- PHP curl error: SSL certificate problem: unable to get local issuer certificate settlement program
- composer Failed to decode response: zlib_decode(): data error
- nginx.conf php-fpm.conf and php.ini Error among the three_ Differences and relations between log instructions
- PHP error in Windows: class’ mysqli ‘not found
- [Solved] PHP -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory
- Mac PHP Fatal error: Class ‘Memcache’ not found
- PHP php-config is not installed error in ubuntu 16 [How to Solve]
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- [Solved] PHP installation Phalcon expansion error
- PHP: The Difference between \Throwable, \Error and \Exception
- PHP large file upload error 413: request entity too large [How to Solve]
- How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement
- laravel The Process class relies on proc_open, which is not available on your PHP installation.
- HTML + PHP inline execute JavaScript Error [How to Solve]