You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode怎么解决

2022-11-09 0 557

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

Laravel 项目安装验证码 mews/captcha 扩展,出现如下错误信息:

 

composer require mews/captcha

 

Using version ^2.2 for mews/captcha

./composer.json has been updated

Loading composer repositories with package information

Updating dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

 

Problem 1

- mews/captcha 2.2.0 requires intervention/image ~2.2 -> satisfiable by intervention/image[2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.10, 2.3.11, 2.3.12, 2.3.13, 2.3.14, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6

, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.1, 2.4.2, 2.4.x-dev].

..........

- intervention/image 2.2.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.

- intervention/image 2.2.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.

- Installation request for mews/captcha ^2.2 -> satisfiable by mews/captcha[2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].

 

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.

 

Installation failed, reverting ./composer.json to its original content.

 

排查原因是php需要开启fileinfo扩展,

 

编辑php.ini文件,打开extension=php_fileinfo.dll 就可以了,重新运行composer命令,安装成功

 

composer require mews/captcha

 

Using version ^2.2 for mews/captcha

./composer.json has been updated

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 2 installs, 0 updates, 0 removals

- Installing intervention/image (2.4.2): Downloading (100%)

- Installing mews/captcha (2.2.4): Downloading (100%)

intervention/image suggests installing ext-imagick (to use Imagick based image processing.)

intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)

Writing lock file

Generating optimized autoload files

> Illuminate\Foundation\ComposerScripts::postAutoloadDump

> @php artisan package:discover --ansi

Discovered Package: beyondcode/laravel-dump-server

Discovered Package: fideloper/proxy

Discovered Package: intervention/image

Discovered Package: laravel/nexmo-notification-channel

Discovered Package: laravel/slack-notification-channel

Discovered Package: laravel/tinker

Discovered Package: mews/captcha

Discovered Package: nesbot/carbon

Discovered Package: nunomaduro/collision

Package manifest generated successfully.

1. 本站所有资源来源于用户上传和网络,因此不包含技术服务请大家谅解!如有侵权请邮件联系客服!cheeksyu@vip.qq.com
2. 本站不保证所提供下载的资源的准确性、安全性和完整性,资源仅供下载学习之用!如有链接无法下载、失效或广告,请联系客服处理!
3. 您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容资源!如用于商业或者非法用途,与本站无关,一切后果请用户自负!
4. 如果您也有好的资源或教程,您可以投稿发布,成功分享后有积分奖励和额外收入!
5.严禁将资源用于任何违法犯罪行为,不得违反国家法律,否则责任自负,一切法律责任与本站无关

源码下载

发表评论
暂无评论