Having some trouble getting past this memory error. It seems like I should have plenty of RAM free to install. Also, I looked in another thread that recommended against using Swap (though if you think that is the way to go please explain how to do it if possible, since I don't know).
I am using Amazon Lightsail LAMP with Bitnami.
Error:
bitnami@ip-:/opt/bitnami/apache/htdocs$ composer require fof/user-directory
Using version 0.3.4 for fof/user-directory
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing fof/components (0.1.1):
Installation failed, reverting ./composer.json to its original content.
The following exception is caused by a lack of memory or swap, or not having swap configur
ed
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors
for details
PHP Warning: proc_open(): fork failed - Cannot allocate memory in phar:///opt/bitnami/php
/bin/composer.phar/vendor/symfony/console/Application.php on line 952
Warning: proc_open(): fork failed - Cannot allocate memory in phar:///opt/bitnami/php/bin/
composer.phar/vendor/symfony/console/Application.php on line 952
[ErrorException]
proc_open(): fork failed - Cannot allocate memory
require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest]
[--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-wit
h-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-p
ackages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--]
[<packages>]...
bitnami@ip:/opt/bitnami/apache/htdocs$ free -m
total used free shared buff/cache available
Mem: 1995 760 1093 46 141 1067
Swap: 0 0 0
bitnami@ip:/opt/bitnami/apache/htdocs$