Failed to decode response: zlib_decode(): data error

在composer 安装Laravel的时候出现下面这个错:

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

有个提示,然后进去这个链接:
https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode
然后分析了一下,有两种情况:
1、网络不稳定,不能从composer指定库里面获取包;
2、第二种原因就比较复杂,杀毒软件,或者ipv6问题。原文如下:

Due to some intermittent issues on Travis and other systems, we introduced a degraded network mode which helps Composer finish successfully but disables a few optimizations. This is enabled automatically when an issue is first detected. If you see this issue sporadically you probably don't have to worry (a slow or overloaded network can also cause those time outs), but if it appears repeatedly you might want to look at the options below to identify and resolve it.

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. Take a look at the next section for IPv6 workarounds.

If none of the above helped, please report the error.

意思是使用了杀毒软件啥的,我win10直接裸奔的,自带杀毒功能,因此我就直接重新安装了一次,果然是网络问题。

你可能感兴趣的:(laravel,框架)