错误laravel 5.8安装软件包(安装失败,将./composer.json恢复为其原始内容。)

时间:2019-11-04 01:45:50

标签: php laravel laravel-5.8

Console Output

laravel/passport使用^ 8.0版

  

./ composer.json已更新加载带有以下内容的作曲家存储库   软件包信息更新依赖项(包括require-dev)   要求无法解决为一组可安装的软件包。

问题1

    - Conclusion: remove laravel/framework v5.8.35
    - Conclusion: don't install laravel/framework v5.8.35
    - laravel/passport 8.x-dev requires illuminate/support ^6.0|^7.0 -> satisfiable by laravel/framework[6.x-dev], illuminate/support
[6.x-dev, 7.0.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.2.0, v6.3.0, v6.4.1].
    - laravel/passport v8.0.0 requires illuminate/support ^6.0|^7.0 -> satisfiable by laravel/framework[6.x-dev], illuminate/support[
6.x-dev, 7.0.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.2.0, v6.3.0, v6.4.1].
    - Can only install one of: laravel/framework[6.x-dev, v5.8.35].
    - don't install illuminate/support 6.x-dev|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.0.0|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.0.1|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.0.2|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.0.3|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.0.4|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.1.0|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.2.0|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.3.0|don't install laravel/framework v5.8.35
    - don't install illuminate/support v6.4.1|don't install laravel/framework v5.8.35
    - don't install illuminate/support 7.0.x-dev|don't install laravel/framework v5.8.35
    - Installation request for laravel/framework (locked at v5.8.35, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.35].
    - Installation request for laravel/passport ^8.0 -> satisfiable by laravel/passport[8.x-dev, v8.0.0].

安装失败,将./composer.json恢复为其原始内容。

5 个答案:

答案 0 :(得分:1)

不是很明显吗?要使用laravel/passport ^ 8.0的版本。

您必须安装laravel 6。 必填语句:https://laravel.com/docs/6.x/upgrade

您正在使用什么命令?

composer require laravel/passport

我建议您使用它。您使用的Laravel版本将进行适当的安装。

答案 1 :(得分:1)

要为 Laravel Framework 5.8 安装最新版本laravel/passport,请运行以下命令

composer require laravel/passport

如果仍然出现错误,请安装laravel / passport v7.5.1

添加到composer.json文件中

"require": {
        "laravel/passport": "^7.5.1"
    },

之后,在命令提示符下运行以下命令:composer update

我测试过laravel/passport v7.5.1,它与 Laravel Framework 5.8

兼容

注意::如果您需要以下版本的“ laravel / passport”:“ ^ 8.0” ,则必须使用laravel 6

答案 2 :(得分:0)

您是否可以尝试包括以前版本的护照,例如 composer require laravel/passport "7.5.1"

如果您有时间并且您的项目规模不大,我还是建议ÖzgürCanKaragöz回答。

答案 3 :(得分:0)

  

作曲者需要laravel / passport“ 7.5.1”

适用于laravel 5.8版*

答案 4 :(得分:0)

使用composer require laravel/passport=^7.4