沃梦达 / 编程问答 / php问题 / 正文

最新的 Composer 版本不拉 Laravel

Latest Composer version not pulling Laravel(最新的 Composer 版本不拉 Laravel)

本文介绍了最新的 Composer 版本不拉 Laravel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Composer 的最新版本没有拉 Laravel,我认为这可能是因为 Composer 添加了新的 secure_http 功能,用于从 Packagist 下载,而 Laravel Packagist 是在 HTTP 中.这就是我的想法,所以我需要解决方案.以前版本的 Composer 做得很好.当我尝试安装 Laravel 安装程序时,我的终端上显示的错误是:

The Latest version of Composer is not pulling Laravel, I thought it could be because of Composer added new secure_http feature for downloading from Packagist and Laravel Packagist are in HTTP. This is what I think, so I need solution. The previous version of Composer doing well. The error showing on my terminal when I was trying to install Laravel installer, is:

无法解码响应:zlib_decode(): 数据错误以降级模式重试,检查 https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode 了解更多信息 您的配置不允许连接到 http://packagist.org.请参阅 https://getcomposer.org/doc/06-config.md#secure-http 了解详情.http://packagist.org 无法完全加载,包信息是从本地缓存加载的,可能已过期安装失败,正在将 ./composer.json 还原为其原始内容.[ComposerDownloaderTransportException] 您的配置不允许连接到 http://packagist.org.请参阅 https://getcomposer.org/doc/06-config.md#secure-http 了解详情.

Failed to decode response: zlib_decode(): data error Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info Your configuration does not allow connection to http://packagist.org. See https://getcomposer.org/doc/06-config.md#secure-http for details. http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date Installation failed, reverting ./composer.json to its original content. [ComposerDownloaderTransportException] Your configuration does not allow connection to http://packagist.org. See https://getcomposer.org/doc/06-config.md#secure-http for details.

推荐答案

我也遇到了同样的问题.在此处找到解决方案:Reddit 对问题的讨论

I had the same problem. Found the solution here:Reddit Discussion of the issue

基本上,您有两种选择:

Basically, you have two options:

  • 通过运行恢复到以前的版本

  • Revert to previous version, by running

自我更新--rollback

或者,通过运行来降级作曲家

Or, downgrade composer by running

composer config -g secure-http false

这篇关于最新的 Composer 版本不拉 Laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:最新的 Composer 版本不拉 Laravel

基础教程推荐