#なにがおきたか
laravel-enumを入れようとすると死ぬ。
composer require bensampo/laravel-enum
Using version ^2.1 for bensampo/laravel-enum
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed
調べるとメモリがたりんと
ならばと5GBくらいスワップ作ってみる
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=5000
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
が変わらず死ぬ
composer updateしてみる
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install laravel/framework v6.18.26
- Conclusion: don't install laravel/framework v6.18.25
- Conclusion: don't install laravel/framework v6.18.24
- Conclusion: don't install laravel/framework v6.18.23
- Conclusion: don't install laravel/framework v6.1
(以下大量に)
Laravel6にbensampo/laravel-enumのv2が使えないのではと思ってドキュメント見てみる
Laravel 7.5 or newer
PHP 7.2.5 or newer
だめやん...
bensampo/laravel-enum: ^1.38
で入れてみると
うまくいった
#結論
composer require bensampo/laravel-enum:^1.38
#メモリー足りなかったら
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=2048
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
#それでもだめなら
php -d memory_limit=-1 /usr/local/bin/composer require bensampo/laravel-enum:^1.38
composer updateしたり、lock消したり、vendor消したりめっちゃはまった...