简体   繁体   中英

Your requirements could not be resolved to an installable set of packages for laravel

I use 5.7v Laravel and 7.2.1v PHP and composer last version, but when I like to create new project these errors appeared:

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - Installation request for league/flysystem 1.0.47 -> satisfiable by league/flysystem[1.0.47]. 
    - league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2  
    - league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.  
    - laravel/framework v5.7.9 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.47]. 0 
    - Installation request for laravel/framework v5.7.9 -> satisfiable by laravel/framework[v5.7.9].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php-7\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.`

First of all, stop the XAMPP/Wamp and then kindly remove the starting semicolon ( ; ) from your xampp\\php\\php.ini the following code.

;extension=fileinfo

or in windows with IIS

extension=php_fileinfo.dll

And then restart your XAMPP/Wamp.


NOTE: For Windows, you can find the file in the C:\\xampp\\php\\php.ini -Folder (Windows) or in the etc-Folder (within the xampp-Folder).

The problem seems to be what the error message says - your system is missing fileinfo PHP extension. Since you're on Windows, open C:\\php-7\\php.ini file, search for the following line, and remove the beginning ; if exists:

extension=fileinfo

or in windows with IIS

extension=php_fileinfo.dll

只需在php.ini取消注释extension=fileinfo ,即使没有 xampp 也对我有用

在我的情况下,我只是在php.ini取消注释extension=fileinfo然后它就可以工作了

In my case, I had both installed PHP and XAMPP and in my path, i pointed at C:/php/ as the PHP interpreter. In C:/php/php.ini , it was ;extension=fileinfo whereas in C:/xampp/php/php.ini it was extension=fileinfo . I did two changes,

  1. Deleted C:/php/
  2. Changed my path to PHP to point to c:/xampp/php/

The problem is now resolved

Simple soultion, just delete php 7.4.11 folder from C drive.

update php location from C:\\php 7.4.11 to C:\\xampp\\php in path variable under environmental variable

in my case i am using window machine ...my league/flysystem is missing .. type this command in cmd on project Dir.. composer require league/flysystem

for mine case its work...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM