如何使用Composer在laravel 5.7中安装名媛?

时间:2019-07-03 06:37:57

标签: composer-php laravel-5.7 laravel-socialite

我正在尝试在laravel 5.7中安装名媛。但是似乎找不到安装程序包。这是它的外观:

composer require laravel/socialite
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://packagist.org/p/paragonie/random_compat%24db1b5c1b43ef534aed7fe377b7d6e9ada59ee25deed500ba426fd9e421116aa3.json" file could not be downloaded: failed to open stream: HTTP request failed! 
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

我尝试使用composer require laravel/socialitecomposer require laravel/socialite "^3.2.0",但遇到相同的问题。

2 个答案:

答案 0 :(得分:0)

我终于从here那里得到了解决方案

所以我要做的是将此行添加到composer.json文件中

"repositories": [
{
    "packagist": false
},
{
    "type": "composer",
    "url": "https://packagist.org/"
}
],

如您所见,作曲家需要https,而laravel默认使用http

答案 1 :(得分:-1)

"^3.2.0" 这是用于 Laravel 5.6 用于 Laravel 5.7 框架的尝试这个

composer require laravel/socialite "4.0"