我刚刚下载了最新的laravel 5.3,我试图安装passport,但我得到了以下composer错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport v2.0.0 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- laravel/passport v2.0.1 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0].
- Conclusion: don't install illuminate/http v5.4.0
- Installation request for laravel/passport ^2.0 -> satisfiable by laravel/passport[v2.0.0, v2.0.1].
Installation failed, reverting ./composer.json to its original content.
Composer .json文件
4条答案
按热度按时间omqzjyyz1#
它发生了,因为在发布Laravel 5.4之后,这个包也更新到了2.0版,需要Laravel 5.4。你使用的是Laravel 5.3。尝试安装早期版本:
此外,您可以在此处了解此软件包的版本:
Laravel Passport
rur96b6h2#
对于Laravel 5.3。
在您的
composer.json
文件中放入"laravel/passport": "~1.0"
并运行“composer update”命令。eagi6jfj3#
根据Rashad的回答,你需要一个小于主要版本2的版本。这可以通过几个版本字符串
^v1
、v1.x
、>= 1 < 2
和几个其他组合来实现。我用这个:
php composer.phar require laravel/passport ^v1
,它工作得很棒。cwtwac6a4#
安装laravel passport版本7: