【问题标题】:Laravel voyager - requirements could not be resolveLaravel voyager - 无法解决需求
【发布时间】:2018-05-04 16:39:04
【问题描述】:

我将laravel 5.4 用于我的项目并安装voyager admin package 它显示一个错误。如何修复这些错误?

PHP version - 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.

【问题讨论】:

  • 这个项目目前在什么操作系统上?苹果电脑?视窗? linux?乌本图?其他的?
  • 对不起,我忘了包括操作系统。这是 Windows 10
  • 您需要启用/安装fileinfo扩展

标签: php laravel voyager


【解决方案1】:

如果您在 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。

Download link for dll file

【讨论】:

  • 在我的情况下还需要将这些不带分列的行添加到 php.ini --> ;extension=pcre.so 也 ;extension=spl.so
【解决方案2】:

To install/activate the extension on windows, the following can be done:

打开提到的ini文件(C:\Program Files (x86)\iis express\PHP\v5.6\php.ini

然后搜索extension=php_fileinfo.dll 并确保它已被注释掉。

关闭并重新打开命令行后,安装应该会成功。

【讨论】:

  • (C:\Program Files (x86)\iis express\PHP\v5.6\php.ini 文件下没有找到extension=php_fileinfo.dll
  • 我的意思是找不到这样的词
  • 您能分享php.ini 文件的内容吗?不过,请确保其中没有敏感信息。
  • 那个url返回404
猜你喜欢
  • 2020-11-13
  • 2018-10-25
  • 1970-01-01
  • 2020-11-03
  • 1970-01-01
  • 1970-01-01
  • 2021-02-13
  • 1970-01-01
  • 2019-08-12
相关资源
最近更新 更多