我在我的项目中使用了 laravel 5.4
并安装 voyager admin package
它显示一个错误。我该如何修复这些错误?
PHP 版本 - PHP 5.6.31
Your requirements could not be resolved to an installable set of packages.
Problem 1
- tcg/voyager v1.1.0 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1].
- tcg/voyager v1.1.1 requires intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, 2.4.1].
- intervention/image 2.4.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- intervention/image 2.4.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for tcg/voyager ^1.1 -> satisfiable by tcg/voyager[v1.1.0, v1.1.1].
To enable extensions, verify that they are enabled in those .ini files:
- C:\Program Files (x86)\iis express\PHP\v5.6\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.ini 文件中没有 php_fileinfo.dll,请检查 xampp/php/ext 文件夹该文件夹中有 php_fileinfo.dll 文件。如果您有 dll 文件,请添加
extension=php_fileinfo.dll
这行位于 php.ini 文件中。如果您的文件夹中没有 dll 文件,请根据您的 PHP 版本从互联网上下载,然后将其放入 xampp/php/ext 文件夹中并添加上面的 php 行.ini。之后重新启动xampp。
关于php - Laravel voyager - 需求无法解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50169876/