0

I'm using php version 8.1.5. Any time I try to create a Laravel project I receive the following error

https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Operation timed out after 10009 milliseconds with 0 out of 0 bytes received), package information was loaded from the local cache and may be out of date

Followed by this Problem 1 - laravel/framework[v9.2.0, ..., 9.x-dev] require league/flysystem ^3.0 -> satisfiable by league/flysystem[3.0.0, ..., 3.x-dev]. - league/flysystem[3.0.0, ..., 3.x-dev] require league/mime-type-detection ^1.0.0 -> satisfiable by league/mime-type-detection[1.0.0, ..., 1.11.0]. - league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.1.5) does not satisfy that requirement. - league/mime-type-detection[1.4.0, ..., 1.11.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. - Root composer.json requires laravel/framework ^9.2 -> satisfiable by laravel/framework[v9.2.0, ..., 9.x-dev].

  • 1
    I have no idea what OS you have or what is your dev env. but all you have to do is install `ext-fileinfo` so follow such answers https://stackoverflow.com/questions/23771117/requires-ext-fileinfo-how-do-i-add-that-into-my-composer-json-file – Mohamed Mo Kawsara May 02 '22 at 03:45
  • Try upgrade your composer and then update all your package by `composer update` or install everything again by `composer install` – Ruchita Sheth May 02 '22 at 05:19
  • @MoKawsara is correct you need to install the fileinfo extension. If you are running windows you can do this by editing the php.ini file. In all other OSs this should be enabled by default. – apokryfos May 02 '22 at 07:44
  • @MoKawsara I followed those instructions and it was solved. However, I encountered another error when I tried running php artisan in the new project folder. PHP Warning: require(C:\Users\lenovo\Desktop\new/vendor/autoload.php): Failed to open stream: No such file or directory in C:\Users\lenovo\Desktop\new\artisan on line 18 PHP Fatal error: Uncaught Error: Failed opening required 'C:\Users\lenovo\Desktop\new/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\lenovo\Desktop\new\artisan:18 Stack trace: #0 {main} thrown in C:\Users\lenovo\Desktop\new\artisan on line 18 – Yoocee Ansah May 02 '22 at 12:09
  • Glad it worked, for this error you just need to delete `rm composer.lock` then run `composer install` – Mohamed Mo Kawsara May 02 '22 at 12:44
  • @MoKawsara where do I find the "rm composer.lock" file? – Yoocee Ansah May 02 '22 at 14:18
  • @MoKawsara I found composer.lock, deleted it and run composer install. However the error persists and I've repeated the process multiple times over – Yoocee Ansah May 02 '22 at 15:13

0 Answers0