composer安裝laravel-socialite出現版本問題

Leeeeee發表於2021-02-27

在使用composer命令:composer require laravel/socialite進行安裝發生錯誤。
版本:laravel5.6
出現錯誤:```php
Your requirements could not be resolved to an installable set of packages.

Problem 1

    - laravel/socialite[v5.2.0, ..., 5.x-dev] require illuminate/http ^6.0|^7.0|^8.0 -> found illuminate/http[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires laravel/socialite ^5.2 -> satisfiable by laravel/socialite[v5.2.0, v5.2.1, 5.x-dev].


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

```
錯誤原因:laravel/socialite[v5.2.0, …, 5.x-dev]依賴的版本要laravel6.0以上,導致安裝失敗。
解決方法:更新laravel版本或者安裝低版本的socialite

本作品採用《CC 協議》,轉載必須註明作者和本文連結
Lee

相關文章