php Laravel passport安装错误

0dxa2lsx  于 2023-05-16  发布在  PHP
关注(0)|答案(4)|浏览(218)

我刚刚下载了最新的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文件

http://pastebin.com/ne4RkL96

omqzjyyz

omqzjyyz1#

它发生了,因为在发布Laravel 5.4之后,这个包也更新到了2.0版,需要Laravel 5.4。你使用的是Laravel 5.3。尝试安装早期版本:

composer require laravel/passport ^v1

此外,您可以在此处了解此软件包的版本:
Laravel Passport

rur96b6h

rur96b6h2#

对于Laravel 5.3。
在您的composer.json文件中放入"laravel/passport": "~1.0"并运行“composer update”命令。

eagi6jfj

eagi6jfj3#

根据Rashad的回答,你需要一个小于主要版本2的版本。这可以通过几个版本字符串^v1v1.x>= 1 < 2和几个其他组合来实现。
我用这个:php composer.phar require laravel/passport ^v1,它工作得很棒。

cwtwac6a

cwtwac6a4#

安装laravel passport版本7:

> composer require laravel/passport:7.5.1

相关问题