2015-04-21 163 views
1

我試圖在Laravel 5中安裝Laravel-elfinder。在它的GitHub page 中有一個循序漸進的教程,我遵循但它不工作。嘗試安裝elfinder-laravel時出現作曲者錯誤

我有XAMPP Web服務器在我的Windows PC上的Windows 8

基本上我要我的項目文件夾,並執行

composer require barryvdh/laravel-elfinder 

幾秒鐘後,我得到這個錯誤:

C:\xampp\htdocs\edent>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 [email protected] -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0]. 
    - barryvdh/laravel-elfinder v0.3.1 requires barryvdh/elfinder-flysystem-driv 
er [email protected] -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0]. 
    - barryvdh/laravel-elfinder v0.3.2 requires barryvdh/elfinder-flysystem-driv 
er [email protected] -> satisfiable by barryvdh/elfinder-flysystem-driver[0.1.0]. 
    - barryvdh/laravel-elfinder v0.3.3 requires barryvdh/elfinder-flysystem-driv 
er [email protected] -> 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. 

有沒有人有任何想法我可以解決這個問題?

回答

1

您通過作曲家安裝的所有公共軟件包均可在packagist.org中「搜索」。所以,如果你在packagist中搜索laravel-elfinder,最終你會得到at this page

在那裏,你會看到一個列表需要,這意味着你看到的包依賴於另一個包,並且在安裝這些依賴之前你將無法使用你想要的包。但是,由於Composer非常聰明,它會嘗試爲您解決這些依賴關係。

就你而言,作曲家儘可能地解決了這個問題。基本上,barryvdh/laravel-elfinder取決於barryvdh/elfinder-flysystem-driver,反過來,取決於intervention/image。如果你去到後來的包,你會看到列表中需要這樣:

Requires
php: >=5.3.0
ext-fileinfo: *

我已經寫了這一切,所以你可以理解爲什麼在你的信息轉儲,您看到多個消息指出

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

基本上,這意味着你需要在你的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命令。

相關問題