简体   繁体   中英

Can't Install Laravel/Passport on 5.4

I'm following the docs so I run this.

composer require laravel/passport

But this Is what I get...

Using version ^6.0 for laravel/passport
./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
    - laravel/passport v6.0.7 requires illuminate/database ~5.6 -> satisfiable by illuminate/database[5.6.x-dev, 5.7.x-dev, 5.8.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.2, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9] but these conflict with your requirements or minimum-stability.

Looking at the composer.json file looks like I'm using the 5.4 version

"illuminate/database": "5.4.*",

which makes sense because I'm using that version of the framework. What am I suppose to do? update that is very risky right?
And more important why is it not working out of the box?

For laravel 5.4 you should use:

composer require laravel/passport=~4.0

If you dont specify the version, It will install the latest version and the actual is for laravel 5.6+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM