composer install でエラーになる

$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1
- laravel/framework is locked to version v7.8.1 and an update of this package was not requested.
- laravel/framework v7.8.1 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension.

 

$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- laravel/framework[v7.0.0, ..., 7.x-dev] require ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension.
- Root composer.json requires laravel/framework ^7.0 -> satisfiable by laravel/framework[v7.0.0, ..., 7.x-dev].

 

 

原因としてはlaravelを動かすためにmbstringが要るけど、それが入ってないよ

入れてねってこと

 

$ yum list installed | grep string
libunistring.x86_64 0.9.3-9.amzn2.0.2 installed
$ sudo yum install php-mbstring

 

次からは既存と合わせるために、こっちの方がいいかも

$ sudo yum install php72-mbstring

 

これで composer install が実行できるようになる。