Laravel安装因PHP版本不对的bug

问题 

$ 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版本也可以

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值