每当我尝试创建一个新项目时,我都会收到此错误。关于它可能是什么有什么想法吗?
Problem 1 - laravel/framework[v8.75.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.75 -> satisfiable by laravel/framework[v8.75.0, ..., 8.x-dev]. To enable extensions, verify that they are enabled in your .ini files: - C:\PHP7\php.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.
错误告诉您到底发生了什么。
laravel/框架需要flysystem。 Flysystem 需要 PHP 的 fileinfo 扩展。
这似乎已被禁用。
按照提示转到您的
php.ini
文件 (C:\PHP7\php.ini
),编辑php.ini
例如,使用记事本创建文件。CTRL+F
并搜索fileinfo
(如果您想彻底搜索extension=php_fileinfo.dll
)。它前面应该有一个分号(
;
),这意味着它已被注释掉,因此被禁用。删除分号并再次执行这些步骤。现在应该可以工作了。