广告
返回顶部
首页 > 资讯 > 后端开发 > PHP编程 >php laravel框架 项目搭建环境运行 composer install 遇到问题
  • 903
分享到

php laravel框架 项目搭建环境运行 composer install 遇到问题

phplaravelcomposer 2023-09-12 18:09:39 903人浏览 薄情痞子
摘要

错误代码如下: Installing dependencies from lock file (including require-dev)Verifying lock file contents can be installed on c

错误代码如下:

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 命令,可能有两种情况如下:

  1. 执行成功,可以进行下一步
  2. 还出现错误,错误代码如下:
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

--结束END--

本文标题: php laravel框架 项目搭建环境运行 composer install 遇到问题

本文链接: https://www.lsjlt.com/news/404933.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作