我安装了Laravel 5.8的一个新项目,但当我安装JWT Auth包时,
composer require tymon/jwt-auth它显示了一个错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- Conclusion: remove nesbot/carbon 2.17.0
- Conclusion: don't install nesbot/carbon 2.17.0
- tymon/jwt-auth 0.5.12 requires nesbot/carbon ~1.0 -> satisfiable by nesbot/carbon[1.0.0, 1.0.1, 1.1.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.2.0, 1.20.0, 1.21.0, 1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.24.1, 1.24.2, 1.25.0, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4, 1.27.0, 1.28.0, 1.29.0, 1.29.1, 1.29.2, 1.3.0, 1.30.0, 1.31.0, 1.31.1, 1.32.0, 1.33.0, 1.34.0, 1.34.1, 1.34.2, 1.34.3, 1.34.4, 1.35.0, 1.35.1, 1.36.0, 1.36.1, 1.36.2, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0].
- Can only install one of: nesbot/carbon[1.26.3, 2.17.0].
- Can only install one of: nesbot/carbon[1.26.4, 2.17.0].
- Can only install one of: nesbot/carbon[1.27.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.28.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.29.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.29.1, 2.17.0].
- Can only install one of: nesbot/carbon[1.29.2, 2.17.0].
- Can only install one of: nesbot/carbon[1.30.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.31.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.31.1, 2.17.0].
- Can only install one of: nesbot/carbon[1.32.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.33.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.34.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.34.1, 2.17.0].
- Can only install one of: nesbot/carbon[1.34.2, 2.17.0].
- Can only install one of: nesbot/carbon[1.34.3, 2.17.0].
- Can only install one of: nesbot/carbon[1.34.4, 2.17.0].
- Can only install one of: nesbot/carbon[1.35.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.35.1, 2.17.0].
- Can only install one of: nesbot/carbon[1.36.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.36.1, 2.17.0].
- Can only install one of: nesbot/carbon[1.36.2, 2.17.0].
- Can only install one of: nesbot/carbon[1.0.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.8.0, 2.17.0].
- Can only install one of: nesbot/carbon[1.9.0, 2.17.0].
- Installation request for nesbot/carbon (locked at 2.17.0) -> satisfiable by nesbot/carbon[2.17.0].
Installation failed, reverting ./composer.json to its original content.我什么都试过了,但似乎没有一样对我有效。然后,我检查这个链接https://github.com/tymondesigns/jwt-auth/issues/1764
如何解决这个问题?
发布于 2019-05-07 03:05:07
为了在Laravel5.8中安装JWTAuth,您需要使用以下命令
composer require tymon/jwt-auth:dev-develop发布于 2019-07-21 17:23:27
是的,github上有一个open issue。解决方案:composer require tymon/jwt-auth:1.0.0-rc.4.1
要在Laravel 5.8中安装和正确使用它,您需要"tymon/jwt-auth": "1.0.0-rc.4.1"。不是0.5.x,甚至不是1.0.x。
我使用它,一切都很好。
发布于 2021-05-19 20:27:30
此程序包尚不支持PHP 8.0
您可以添加composer require tymon/jwt-auth --ignore-platform-reqs
--ignore-platform-reqs适合我,而且你需要最新的作曲家。
https://stackoverflow.com/questions/55824542
复制相似问题