When I do this: composer create-project laravel/laravel example-app
I get this:
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v10.10.0, ..., v10.22.0] require league/flysystem ^3.8.0 -> satisfiable by league/flysystem[3.8.0, ..., 3.15.1].
- league/flysystem[3.3.0, ..., 3.14.0] require league/mime-type-detection ^1.0.0 -> satisfiable by league/mime-type-detection[1.0.0, ..., 1.13.0].
- league/flysystem[3.15.0, ..., 3.15.1] require league/flysystem-local ^3.0.0 -> satisfiable by league/flysystem-local[3.15.0].
- league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.2.9) does not satisfy that requirement.
- league/mime-type-detection[1.4.0, ..., 1.13.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- league/flysystem-local 3.15.0 require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- Root composer.json requires laravel/framework ^10.10 -> satisfiable by laravel/framework[v10.10.0, ..., v10.22.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:php8php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.
I was hoping to create a simple Laravel project.
2
Answers
Actually the problem is obviously described in the error message. It seems fileinfo extension is not enabled/installed in your local php. There is a php.ini file in your php folder (C:php8). Just open this file with a text editor and search for (CTRL+F)
fileinfo
. You should find something like;extension=fileinfo
. Edit this line by removing the semicolon from the beginning. Save the file, and exit, then retry.please enable all extension that listed on laravel specification. in your case, its seems fileinfo extenstion not enabled or not isntalled. if you use ubuntu or debian, please install it with sudo apt install php-fileinfo or sudo apt install php-common. you also can enable it with edit php.ini. but i like use apt.