当前位置: 首页 > 工具软件 > PHP-Version > 使用案例 >

解决You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode

米项禹
2023-12-01

环境

centos 7

问题

运行composer install ,产生如下问题:

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - league/flysystem is locked to version 1.1.9 and an update of this package was not requested.
    - league/flysystem 1.1.9 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 2
    - league/mime-type-detection is locked to version 1.11.0 and an update of this package was not requested.
    - league/mime-type-detection 1.11.0 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 3
    - league/flysystem 1.1.9 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - topthink/framework v6.0.12 requires league/flysystem ^1.1.4 -> satisfiable by league/flysystem[1.1.9].
    - topthink/framework is locked to version v6.0.12 and an update of this package was not requested.

To enable extensions, verify that they are enabled in your .ini files:
    - /www/server/php/72/etc/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 --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.

解决办法

php需要安装 fileinfo扩展

 类似资料: