0
Help us understand the problem. What are the problem?

posted at

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

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

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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
0
Help us understand the problem. What are the problem?