Home > Development Tools > composer > Are you experiencing out of memory issues when installing plugins in composer?

Are you experiencing out of memory issues when installing plugins in composer?

藏色散人
Release: 2021-10-13 16:50:51
forward
1811 people have browsed it

This article is written by the tutorial column of composer to introduce to you the problem of insufficient memory when installing plugins in composer. I hope it will be helpful to friends who need it!

Are you experiencing out of memory issues when installing plugins in composer?

Composer installs the plug-in and there is insufficient memory.

Recently, memory appears when installing phpspreadsheet using the command composer require phpoffice/phpspreadsheet Insufficient problem, the following error occurs:

The following exception is caused by a lack of memory or swap, or not having swap configured
Copy after login

Use the following method to solve it perfectly:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024  
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
Copy after login

Composer introduction:

Composer is PHP5.3 or above Dependency management tools. It allows you to declare the code libraries your project depends on and it will install them for you in your project. Composer is not a package manager. Yes, it involves "packages" and "libraries", but it's managed on a per-project basis, with installations in some directory within your project (e.g. vendor). By default it won't install anything globally. So this is just a dependency management.

For more composer-related technical articles, please visit the composer tutorial column!

The above is the detailed content of Are you experiencing out of memory issues when installing plugins in composer?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template