4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

laravel-enum入れてみる。(入れようとしたら難航した)

Last updated at Posted at 2020-07-25

#なにがおきたか

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消したりめっちゃはまった...

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?