1

我试图使用作曲家安装 tymon/jwt-auth 和 laravel 5.6.4

作曲家需要 tymon/jwt-auth

但它显示了一些这样的错误:

Using version ^0.5.12 for tymon/jwt-auth
./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
- Conclusion: don't install barryvdh/laravel-cors v0.8.6
- Conclusion: don't install barryvdh/laravel-cors v0.8.5
- Conclusion: don't install barryvdh/laravel-cors V0.8.4
- Conclusion: don't install barryvdh/laravel-cors v0.8.3
- Conclusion: remove laravel/framework v5.6.3
- Installation request for barryvdh/laravel-cors ^0.8.2 -> satisfiable by barryvdh/laravel-cors[V0.8.4, v0.8.2, v0.8.3, v0.8.5, v0.8.6].
- Conclusion: don't install laravel/framework v5.6.3
- barryvdh/laravel-cors v0.8.2 requires illuminate/support 5.1.x|5.2.x|5.3.x -> satisfiable by illuminate/support[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- don't install illuminate/support 5.1.x-dev|don't install laravel/framework v5.6.3
- don't install illuminate/support 5.2.x-dev|don't install laravel/framework v5.6.3
- don't install illuminate/support 5.3.x-dev|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.1|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.13|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.16|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.2|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.20|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.22|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.25|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.28|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.30|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.31|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.41|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.6|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.1.8|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.0|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.19|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.21|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.24|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.25|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.26|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.27|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.28|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.31|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.32|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.37|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.43|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.45|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.6|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.2.7|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.3.0|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.3.16|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.3.23|don't install laravel/framework v5.6.3
- don't install illuminate/support v5.3.4|don't install laravel/framework v5.6.3
- Installation request for laravel/framework (locked at v5.6.3, required as 5.6.*) -> satisfiable by laravel/framework[v5.6.3].

安装失败,正在将 ./composer.json 还原为其原始内容。

更新:

首先,我尝试composer update在 composer.json 文件中添加一些特定版本的依赖项。喜欢"tymon/jwt-auth": "0.5.*""barryvdh/laravel-cors": "^0.8.2"

之后,我尝试composer require tymon/jwt-auth不删除具有特定版本的行tymon/jwt-authbarryvdh/laravel-cors。从 composer.json 文件中删除具有特定版本的tymon/jwt-auth行后

composer require tymon/jwt-auth  

命令工作正常。

谢谢

4

1 回答 1

5

tymon/jwt-auth包目前还没有提供与 Laravel 5.6 一起使用的稳定版本,这就是 composer 无法解决依赖要求的原因。

如果你查看他们的版本,他们确实有一个支持 Laravel 5.5 和 5.6 的 RC(Release Candidate)。你会感兴趣的应该是1.0.0-rc.2

于 2018-02-20T15:05:23.850 回答