wslを使って初めてlaravelプロジェクト作成後composer install,updateでエラー

wslを使って初めてLaravelのプロジェクトを作った際にcomposer installでエラーが起きた時の対処方法。

# 環境

- PHP 7.0
- Laravel 5.5

# エラー対処

```
$ composer create-project --prefer-dist laravel/laravel プロジェクト名
$ cd プロジェクト名
```

上記コマンドを押下して、下記composer installしたらエラーが出た。

```
$/var/www/html/myproject# composer install
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
    - laravel/framework v5.5.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.43 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.42 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.41 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.40 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.39 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.38 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.37 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.35 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.34 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.33 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.32 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.31 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.30 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.27 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.26 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.25 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.24 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.23 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.22 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.20 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.18 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.12 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.11 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.5.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.10, v5.5.11, v5.5.12, v5.5.13, v5.5.14, v5.5.15, v5.5.16, v5.5.17, v5.5.18, v5.5.19, v5.5.2, v5.5.20, v5.5.21, v5.5.22, v5.5.23, v5.5.24, v5.5.25, v5.5.26, v5.5.27, v5.5.28, v5.5.29, v5.5.3, v5.5.30, v5.5.31, v5.5.32, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.38, v5.5.39, v5.5.4, v5.5.40, v5.5.41, v5.5.42, v5.5.43, v5.5.5, v5.5.6, v5.5.7, v5.5.8, v5.5.9].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
```

mbstringがないといわれているので、下記ライブラリをインポート。

```
sudo apt-get install php-mbstring
```

composer update したら下記エラーが出た。
※composer update でも install でもどちらでもよい。(updateの方が良いかも？)

```
$/var/www/html/myproject# 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
    - phpunit/phpunit 6.5.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.13 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.12 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.11 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.5.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.4.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.4.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.4.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.4.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.3.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.3.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.2.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.2.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.2.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.1.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.1.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.1.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.13 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.12 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.11 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 6.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - Installation request for phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0, 6.3.1, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.5.0, 6.5.1, 6.5.10, 6.5.11, 6.5.12, 6.5.13, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mbstring.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

```

ext-dom がないといわれているので。
下記コマンドをうちライブラリをインポート．

```
sudo apt-get install php7.0-xml
```

その後、

```
composer update
```

解決！！