Laravel 护照安装错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41886595/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel passport installation error
提问by Arafath
I've just downloaded the latest laravel 5.3 and I'm trying to install passport, but I'm getting the following composer error:
我刚刚下载了最新的 Laravel 5.3 并且我正在尝试安装通行证,但是我收到以下作曲家错误:
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 file
http://pastebin.com/ne4RkL96
作曲家 .json 文件
http://pastebin.com/ne4RkL96
采纳答案by Rashad
It happens, because after releasing Laravel 5.4, this package also had been updated to v 2.0 and requires Laravel 5.4. But you are using Laravel 5.3. Try to install earlier version:
之所以会这样,是因为在发布 Laravel 5.4 之后,这个包也更新到了 v 2.0 并且需要 Laravel 5.4。但是您使用的是 Laravel 5.3。尝试安装早期版本:
composer require laravel/passport ^v1
Also, you can learn about the versions of this package here:
此外,您可以在此处了解此软件包的版本:
回答by zenware
In line with Rashad's answer as it helped me out, you need a version of passport less than major version 2. This can be accomplished with several version strings ^v1
, v1.x
, >= 1 < 2
and several other combinations.
在与拉沙德的答案线,因为它帮了我,你需要一个版本护照的小于主要版本2.这可以用几种版本字符串来完成^v1
,v1.x
,>= 1 < 2
和其他几个组合。
I used this: php composer.phar require laravel/passport ^v1
and it worked awesomely.
我用过这个:php composer.phar require laravel/passport ^v1
它工作得非常好。
回答by andrei040191
For Laravel 5.3.
对于 Laravel 5.3。
In your composer.json
file put "laravel/passport": "~1.0"
and run "composer update" command.
在您的composer.json
文件中放入"laravel/passport": "~1.0"
并运行“composer update”命令。
回答by Hichem Sami
Install laravel passport version 7:
安装 Laravel 护照版本 7:
> composer require laravel/passport:7.5.1