php laravel框架 项目搭建环境运行 composer install 遇到问题
短信预约 -IT技能 免费直播动态提醒
错误代码如下:
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.10 and an update of this package was not requested. - league/flysystem 1.1.10 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 - phpoffice/phpspreadsheet is locked to version 1.26.0 and an update of this package was not requested. - phpoffice/phpspreadsheet 1.26.0 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. Problem 4 - league/flysystem 1.1.10 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. - league/flysystem-aws-s3-v3 1.0.30 requires league/flysystem ^1.0.40 -> satisfiable by league/flysystem[1.1.10]. - league/flysystem-aws-s3-v3 is locked to version 1.0.30 and an update of this package was not requested.To enable extensions, verify that they are enabled in your .ini files: - D:\myphp\php.iniYou 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.
解决方案:
修改安装的 php 目录下,php.ini 解开 extension=fileinfo 的注释,去点前面的分号即可
修改完后,在执行 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 - phpoffice/phpspreadsheet is locked to version 1.26.0 and an update of this package was not requested. - phpoffice/phpspreadsheet 1.26.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.To enable extensions, verify that they are enabled in your .ini files: - D:\myphp\php.iniYou 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-gd` to temporarily ignore these required extensions.
解决方案如下:
执行下面命令:composer install --ignore-platform-req=ext-gd
执行后就成功了!!!
来源地址:https://blog.csdn.net/weixin_43132073/article/details/131330128
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341