问题描述
我试图使用composer安装laravel 5.1依赖项。
我安装了最新版本的作曲家:
Composer版本1.0-dev(a54f84f05f915c6d42bed94de0cdcb4406a4707b)2015-10-13 13:09:04
在项目目录下运行 composer install ,它给我以下消息并挂起:
加载包信息的composer存储库
安装依赖项(包括require-dev)
无法解码响应:zlib_decode():data error
使用降级模式重试,检查https:// getcomposer.org/doc/articles/troubleshooting.md#degraded-mode了解更多信息
从 composer 文档:
如果您已指向此页面,检查以下几项:
如果您使用的是 ESET 防病毒,请进入高级设置 Web访问保护
如果您使用的是 IPv6 ,请尝试禁用它。如果这解决了您的问题,请与您的 ISP 或服务器主机联系,问题不是在 Packagist 级别,而是在您和Packagist之间的路由规则互联网大)。
要在 上禁用 > Linux ,请尝试使用此命令,将 IPv4 优先于 的规则附加到您的配置:
sudo sh -cecho'precedence :: ffff:0:0/96 100'>> /etc/gai.conf
$ c $
如果以上没有帮助,请报告错误。
a href =https://getcomposer.org/doc/articles/troubleshooting.md =nofollow noreferrer> https://getcomposer.org/doc/articles/troubleshooting.mdI am trying to install laravel 5.1 dependencies using composer.
I have installed the latest version of composer that is:
Composer version 1.0-dev (a54f84f05f915c6d42bed94de0cdcb4406a4707b) 2015-10-13 13:09:04But when i run composer install on project directory it gives me following message and hangs in there:
Loading composer repositories with package information Installing dependencies (including require-dev) 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解决方案From composer documentation :
If you have been pointed to this page, you want to check a few things:
If you are using ESET antivirus, go in "Advanced Settings" and disable "HTTP-scanner" under "web access protection"If you are using IPv6, try disabling it. If that solves your issues, get in touch with your ISP or server host, the problem is not at the Packagist level but in the routing rules between you and Packagist (i.e. the internet at large). The best way to get these fixed is raise awareness to the network engineers that have the power to fix it.
To disable IPv6 on Linux, try using this command which appends a rule preferring IPv4 over IPv6 to your config:
sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"If none of the above helped, please report the error.
Source: https://getcomposer.org/doc/articles/troubleshooting.md
这篇关于Composer(Laravel5)无法解码响应:zlib_decode():数据错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!