我试图在Laravel 5中安装Laravel elfinder。在它的GitHub页面中我遵循了一个循序渐进的教程,但它不起作用。
我在装有Windows 8的Windows PC上安装了XAMPP web服务器。
基本上,我要去我的项目文件夹并执行
composer require barryvdh/laravel-elfinder
几秒钟后,我得到了这个错误:
C:xampphtdocsedent>composer require barryvdh/laravel-elfinder
Using version 0.3.* for barryvdh/laravel-elfinder
./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
- barryvdh/laravel-elfinder v0.3.0 requires barryvdh/elfinder-flysystem-driv
er 0.1.x@dev -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0].
- barryvdh/laravel-elfinder v0.3.1 requires barryvdh/elfinder-flysystem-driv
er 0.1.x@dev -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0].
- barryvdh/laravel-elfinder v0.3.2 requires barryvdh/elfinder-flysystem-driv
er 0.1.x@dev -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0].
- barryvdh/laravel-elfinder v0.3.3 requires barryvdh/elfinder-flysystem-driv
er 0.1.x@dev -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0].
- barryvdh/elfinder-flysystem-driver 0.1.0 requires intervention/image ~2.0
-> satisfiable by intervention/image[2.0.0, 2.0.1, 2.0.10, 2.0.11, 2.0.12, 2.0.1
3, 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].
- intervention/image 2.1.3 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.1.2 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.1.0 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.9 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.8 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.7 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.6 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.5 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.4 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.3 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.2 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.17 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.16 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.15 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.14 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.13 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.12 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.11 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.10 requires ext-fileinfo * -> the requested PHP ext
ension fileinfo is missing from your system.
- intervention/image 2.0.1 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- intervention/image 2.0.0 requires ext-fileinfo * -> the requested PHP exte
nsion fileinfo is missing from your system.
- Installation request for barryvdh/laravel-elfinder 0.3.* -> satisfiable by
barryvdh/laravel-elfinder[v0.3.0, v0.3.1, v0.3.2, v0.3.3].
Installation failed, reverting ./composer.json to its original content.
有人知道我该怎么解决这个问题吗?
您通过composer安装的所有公共包都可以在packagist.org中"搜索"。因此,如果您在packagist中搜索laravel-elfinder,您将到达此页面。
在那里,您将看到Requires的列表,这意味着您看到的软件包依赖于另一个软件包,在安装这些依赖项之前,您将无法使用所需的软件包。然而,由于Composer非常聪明,它会尝试为您解决这些依赖关系。
在您的情况下,Composer会尽可能多地解析。基本上,barryvdh/laravel-elfinder取决于barryvdd/elfinder飞行系统驱动程序,而该驱动程序又取决于干预/图像。如果你去后面的包,你会看到这样的需求列表:
需要
php:>=5.3.0
ext-fileinfo:*
我写了所有这些,这样你就可以理解为什么在你的消息转储中,你会看到多条声明的消息
intervention/image2.1.3需要extfileinfo*->系统中缺少请求的PHP扩展名fileinfo
基本上,这意味着您需要在PHP安装中启用扩展名fileinfo。
首先,打开您的php.ini
并检查您是否没有对扩展进行注释。寻找这样的东西:
#[PHP_FILEINFO]
#extension=php_fileinfo.dll
如果找到它,请取消注释(删除#
)并重新启动XAMPP。
如果没有,您将需要.zip
文件中与您的PHP安装匹配的文件php_fileinfo.dll
(可以在PHP For Windows下载页面中获得),并且您可以在ext
文件夹中找到该文件。
将该文件复制到您的扩展文件夹中,编辑您的php.ini
并添加此
[PHP_FILEINFO]
extension=php_fileinfo.dll
重新启动您的XAMPP,您就完成了。
安装扩展后,再次运行composer
命令。