Laravel 5.3 socialite 安装错误

Laravel 5.3 socialite installation error

我正在尝试使用此命令安装 laravel socialite 插件

composer require laravel/socialite

但是我会得到以下错误

Your requirements could not be resolved to an installable set of packages

Problem 1 - laravel/socialite v3.0.0 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0]. - laravel/socialite v3.0.2 requires illuminate/http ~5.4 -> satisfiable by illuminate/http[v5.4.0]. - laravel/socialite v3.0.3 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/socialite ^3.0 -> satisfiable by laravel/socialite[v3.0.0, v3.0.2, v3.0.3].

Laravel版本:5.3

php 版本 7.0.13

我认为问题是您正在尝试为 Laravel 5.3 安装最新的社交名流包,它至少需要 Laravel 5.4。

Problem 1 - laravel/socialite v3.0.0 requires illuminate/http ~5.4 -> satisfiable by 

尝试在 Laravel 5.4 上安装。

检查这个:

https://github.com/laravel/socialite/blob/3.0/composer.json

"require": {
        "php": ">=5.4.0",
        "illuminate/contracts": "~5.4",
        "illuminate/http": "~5.4",
        "illuminate/support": "~5.4",
        "guzzlehttp/guzzle": "~6.0",
        "league/oauth1-client": "~1.0"
    },

需要5.4

作为替代方案,您可以使用与 Laravel 5.3 兼容的旧版 socialite,例如:

composer require laravel/socialite 2.0

解决方案:

对于laravel 5.3

运行 遵循命令,这对你有用。

composer require laravel/socialite ^2.0

可能这会有所帮助

composer require laravel/socialite "^3.2.0"

https://laravel.com/docs/5.6/socialite#installation

作曲家要求 laravel/socialite "~3.2.0"