gpt4 book ai didi

php - 无法在 laravel 5.4 中添加 spatie/laravel-sluggable 包

转载 作者:行者123 更新时间:2023-12-02 16:59:18 26 4
gpt4 key购买 nike

我试图在我的设置中添加 spatie/laravel-sluggable 但在终端中遇到了这个错误。我试图搜索这个但没有找到任何相关的解决方案。

这里是错误:

Problem 1
- Conclusion: remove laravel/framework v5.4.36
- Conclusion: don't install laravel/framework v5.4.36
- spatie/laravel-sluggable 2.1.0 requires illuminate/database ~5.5.0
-> satisfiable by illuminate/database[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44].
- spatie/laravel-sluggable 2.1.5 requires illuminate/database ~5.5.0|~5.6.0|~5.7.0
-> satisfiable by illuminate/database[5.7.17, 5.7.18, 5.7.19, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
- spatie/laravel-sluggable 2.1.6 requires illuminate/database ~5.5.0|~5.6.0|~5.7.0
-> satisfiable by illuminate/database[5.7.17, 5.7.18, 5.7.19, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12,
- don't install illuminate/database v5.5.0|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.16|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.17|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.2|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.28|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.33|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.34|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.35|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.36|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.37|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.39|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.40|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.41|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.43|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.5.44|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.6.0|don't install laravel/framework v5.4.36
- don't install illuminate/database v5.6.1|don't install laravel/framework v5.4.36
- Installation request for laravel/framework (locked at v5.4.36, required as 5.4.*)
-> satisfiable by laravel/framework[v5.4.36].
- Installation request for spatie/laravel-sluggable ^2.1
-> satisfiable by spatie/laravel-sluggable[2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6].


Installation failed, reverting ./composer.json to its original content.

我也尝试添加 illuminate/database 但它也显示了同样的问题。

最佳答案

您始终可以在其 composer.json 文件中验证包的要求。

例如,在您的情况下,您可以在此处检查 composer.json: https://github.com/spatie/laravel-sluggable/blob/master/composer.json#L18#L23

你可以注意到这一点:

"require": {
"php" : ">=7.0.0",
"illuminate/database": "~5.5.0|~5.6.0|~5.7.0",
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0"
},

这里说的是最低PHP版本要求,还提到了illuminate/databaseilluminate/support包版本要求,即5.55.65.7 及以上。

这些 illuminate 包适用于 Laravel。它们是 Laravel 框架的核心包,所以它们的版本应该与你的 Laravel 版本相匹配。

您不能在较新的 Laravel 版本上安装旧的 illuminate 包。

我建议您将 Laravel 升级到 5.5 或最新版本。 Spatie 及其软件包大部分时间都是最新的,因此您最好也更新您的软件包。

关于php - 无法在 laravel 5.4 中添加 spatie/laravel-sluggable 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54881714/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com