0

我在本地主机上使用 Homestead。我已按照说明安装它,所以我这样做了:composer require barryvdh/laravel-elfinder然后运行composer update,但它抛出了这个错误:

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

  Problem 1
    - intervention/image 2.1.3 requires ext-fileinfo * -> the requested PHP extension fileinfo is mi
ssing from your system.
    - intervention/image 2.1.2 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    ..
    - intervention/image 2.0.11 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - intervention/image 2.0.10 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - intervention/image 2.0.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - intervention/image 2.0.0-beta.2 requires ext-fileinfo * -> the requested PHP extension fileinf
o is missing from your system.
    - intervention/image 2.0.0-beta requires ext-fileinfo * -> the requested PHP extension fileinfo
is missing from your system.
    - intervention/image 2.0.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is mi
ssing from your system.
    - barryvdh/laravel-elfinder v0.3.2 requires barryvdh/elfinder-flysystem-driver 0.1.x@dev -> sati
sfiable by barryvdh/elfinder-flysystem-driver[0.1.0, 0.1.x-dev].
    - barryvdh/elfinder-flysystem-driver 0.1.0 requires intervention/image ~2.0 -> satisfiable by in
tervention/image[2.0.0, 2.0.0-beta, 2.0.0-beta.2, 2.0.1, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.0
.15, 2.0.16, 2.0.17, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.1, 2.1.2, 2.
1.3].
    - barryvdh/elfinder-flysystem-driver 0.1.x-dev requires intervention/image ~2.0 -> satisfiable b
y intervention/image[2.0.0, 2.0.0-beta, 2.0.0-beta.2, 2.0.1, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14,
 2.0.15, 2.0.16, 2.0.17, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.1, 2.1.2
, 2.1.3].
    - Installation request for barryvdh/laravel-elfinder 0.3.2 -> satisfiable by barryvdh/laravel-el
finder[v0.3.2].

我应该怎么办?在 Google 上没有找到任何解决方案。

4

1 回答 1

1
  1. 在命令行中进入您的项目并运行:

    $ 作曲家需要干预/图像

  2. 转到 config/app.php :

在 $providers 数组中添加这个包的服务提供者。

Intervention\Image\ImageServiceProvider::class
  1. 将此包的外观添加到 $aliases 数组。

    '图像' => 干预\图像\立面\图像::类

  2. Windows 用户:只需编辑 php.ini 并取消注释此行:

    扩展=php_fileinfo.dll

记得重启 Apache 以使新的 php.ini 生效。

homestead halt
homestead up --provision
于 2016-02-04T08:03:58.870 回答