2017-05-30 106 views
3

我不斷收到錯誤,當我鍵入composer require spatie/laravel-backup作曲家需要spatie/laravel備份

 
Nessrines-MacBook-Pro-2:tfw nessrine$ composer require spatie/laravel-backup
Using version ^4.16 for spatie/laravel-backup ./composer.json has been updated
> php artisan clear-compiled
The compiled services file has been removed.
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 - Installation request for spatie/laravel-backup ^4.16 -> satisfiable by spatie/laravel-backup[4.16.0]. - Conclusion: remove spatie/db-dumper 1.5.1 - Conclusion: don't install spatie/db-dumper 1.5.1 - spatie/laravel-backup 4.16.0 requires spatie/db-dumper ^2.6 -> satisfiable by spatie/db-dumper[2.6.0, 2.6.1, 2.7.0]. - Can only install one of: spatie/db-dumper[2.6.0, 1.5.1]. - Can only install one of: spatie/db-dumper[2.6.1, 1.5.1]. - Can only install one of: spatie/db-dumper[2.7.0, 1.5.1]. - Installation request for spatie/db-dumper (locked at 1.5.1) -> satisfiable by spatie/db-dumper[1.5.1].

Installation failed, reverting ./composer.json to its original content. Nessrines-MacBook-Pro-2:tfw nessrine$ composer require spatie/laravel-backup’

enter image description here

+0

你有福填寫這裏提到的所有要求..?https://docs.spatie.be/laravel-backup/v4/requirements –

+0

如何檢查。? –

+0

您可能有另一個需要db-dumper版本1.5.x的軟件包,它與此版本衝突。您應該檢查composer.json中的每個必需包,以確保它們與laravel-backup兼容。 – apokryfos

回答

3

您需要安裝spatie/laravel-backup這就要求數據庫自卸車包的新版本之前手動刪除過時的包spatie/db-dumper

您可以從composer.json文件中刪除spatie/db-dumper包,然後安裝。或運行composer remove spatie/db-dumper,然後繼續安裝備份軟件包。

編輯

從您的評論很明顯,你已經安裝了軟件包spatie/laravel-backup的舊版本。

編輯2

既然你明明順利更新這個包,這裏就是我可以解釋這是最簡單的方法。

運行composer remove spatie/laravel-backup

轉到config/app.php和刪除行Spatie\Backup\BackupServiceProvider::class

運行composer require spatie/laravel-backup

遵循的包,其中還包括在app.php

添加服務提供商後面進一步的說明

https://docs.spatie.be/laravel-backup/v4/installation-and-setup

+0

它沒有工作:/ –

+0

我沒有spatie/db-dumper在第一位 –

+0

@NisrineHafi分享您的composer.json文件內容。 – Sandeesh