Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel composer update error - Failed to decode response: zlib_decode(): data error

I have a problem to update dependencies in my project. Issue:

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

like image 656
reshma kr Avatar asked Jan 07 '23 10:01

reshma kr


2 Answers

In some cases It's only because of poor or interrupted internet connections

One solution might be changing your internet form Wi-Fi to Ethernet.


If you are using ESET antivirus, go in "Advanced Settings" and disable "HTTP-scanner" under "web access protection"


If you're using Virtualbox, Then you might need to downgrade to resolve the issue


If you are using IPv6, try disabling it.

sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
like image 174
Mahdi Younesi Avatar answered Jan 16 '23 18:01

Mahdi Younesi


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"
like image 21
firman Avatar answered Jan 16 '23 18:01

firman