1
0

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 1 year has passed since last update.

【Laravel8.4】composer create-project laravelでエラーが出たときの解決方法

Posted at

#GitBashにコマンドを打ったらエラーが出た。

composer create-project laravel/laravel="8.4.*" laravel

##エラー文

  Problem 1
    - laravel/framework[v8.12.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^8.12 -> satisfiable by laravel/framework[v8.12.0, ..., 8.x-dev].

##解決策

php.iniを開き、Ctrl F → 「fileinfo」で検索

composerをインストールする時にphp.exeを指定するが、そのフォルダにあるphp.ini

;extension=fileinfo

アンコメントします。

extension=fileinfo

fileinfoで検索ヒットしなかった場合、php.iniに↑を追記してください。

##コマンドを再度実行する

composer create-project laravel/laravel="8.4.*" laravel

私の環境ではうまくいきました。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?