问题
$ laravel new blog
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for league/flysystem 1.0.62 -> satisfiable by league/flysystem[1.0.62].
- league/flysystem 1.0.62 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- Installation request for symfony/css-selector v5.0.2 -> satisfiable by symfony/css-selector[v5.0.2].
- symfony/css-selector v5.0.2 requires php ^7.2.5 -> your PHP version (7.2.1) does not satisfy that requirement.
Problem 3
- Installation request for symfony/mime v5.0.2 -> satisfiable by symfony/mime[v5.0.2].
- symfony/mime v5.0.2 requires php ^7.2.5 -> your PHP version (7.2.1) does not satisfy that requirement.
Problem 4
- Installation request for symfony/service-contracts v2.0.1 -> satisfiable by symfony/service-contracts[v2.0.1].
- symfony/service-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.2.1) does not satisfy that requirement.
Problem 5
- Installation request for symfony/translation-contracts v2.0.1 -> satisfiable by symfony/translation-contracts[v2.0.1].
- symfony/translation-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.2.1) does not satisfy that requirement.
Problem 6
- league/flysystem 1.0.62 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- laravel/framework v6.9.0 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.62].
- Installation request for laravel/framework v6.9.0 -> satisfiable by laravel/framework[v6.9.0].
To enable extensions, verify that they are enabled in your .ini files:
- D:\phpstudy\PHPTutorial\php\php-7.2.1-nts\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
方法
我的本地是7.0.1,而下载下来的原来是运行在7.0.8版本的,
于是执行:composer install 时,报了一堆错。解决办法:删掉composer.lock,重新composer install
或者使用phpstudy_pro直接切换php版本也可以