proc_open(): fork failed – Cannot allocate memory

proc_open(): fork failed – Cannot allocate memory が出た時。

swapファイルを作ってやりましょう。
[vagrant@localhost tea]$ sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 7.91221 s, 136 MB/s
[vagrant@localhost tea]$ /sbin/mkswap /var/swap.1
/var/swap.1: 許可がありません
[vagrant@localhost tea]$ sudo /sbin/mkswap /var/swap.1
スワップ空間バージョン1を設定します、サイズ = 1048572 KiB
ラベルはありません, UUID=984427a6-99bf-434c-ad6b-ea90be7f2670
[vagrant@localhost tea]$ sudo /sbin/swapon /var/swap.1
[vagrant@localhost tea]$ php composer.phar require barryvdh/laravel-dompdf
Using version ^0.8.4 for barryvdh/laravel-dompdf
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
– Installing sabberworm/php-css-parser (8.1.0): Loading from cache
– Installing phenx/php-svg-lib (v0.3.2): Downloading (100%)
– Installing phenx/php-font-lib (0.5.1): Downloading (100%)
– Installing dompdf/dompdf (v0.8.3): Downloading (100%)
– Installing barryvdh/laravel-dompdf (v0.8.4): Downloading (100%)
dompdf/dompdf suggests installing ext-imagick (Improves image processing performance)
dompdf/dompdf suggests installing ext-gmagick (Improves image processing performance)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover –ansi
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision

うむー なんだかなー