Laravel Composer安装失败,因为它与另一个需求冲突



我正在尝试将Paystack支付平台集成到我的项目中。但是每次我运行这个命令composer require wisdomanthoni/cashier-paystack,它返回以下错误:

./composer.json has been updated
Running composer update wisdomanthoni/cashier-paystack
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires wisdomanthoni/cashier-paystack ^1.0 -> satisfiable by wisdomanthoni/cashier-paystack[v1.0.0].
- wisdomanthoni/cashier-paystack v1.0.0 requires illuminate/database ~5.7.0|~5.8.0 -> found illuminate/database[v5.7.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Illuminate/Database当前版本为8.29.0。这意味着你正在安装一些Laravel 5。x依赖项(可能在Laravel 8.x上),如果还没有放弃,可能是不兼容的。如果你找不到当前版本,你可能不得不修复你现有的——或者使用它与Laravel 5.x。

我通过手动将库导入到项目中并运行composer更新命令来手动解决依赖关系

我在尝试安装这个空间包:composer require spatie/laravel-disable-floc时遇到了类似的问题,并得到了这个错误消息:您的需求无法解决为一组可安装的包。

问题1-根作曲家。Json要求:space/larvel -disable-floc ^1.0 ->满足由spatie/laravell -disable-floc[1.0.0]。- spatie/laravell -disable-floc 1.0.0需要illuminate/contracts ^7.30|^8.37 ->找到illuminate/contracts[v7.30.0,…]7。X-dev, v8.37.0,…8。X-dev],但是没有加载,可能是因为它与另一个需求冲突。

安装失败,正在还原。/composer。Json和。/composer。锁定他们的原始内容。

很想知道你做了什么。或者听取别人的建议。

最新更新