composer icon indicating copy to clipboard operation
composer copied to clipboard

"Failed to decode zlib stream" when install

Open PrinC opened this issue 11 years ago • 23 comments

Get error when install composer with curl -sS https://getcomposer.org/installer | php

#!/usr/bin/env php
All settings correct for using Composer
Downloading...
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Failed to decode zlib stream' in -:574
Stack trace:
#0 -(417): HttpClient->get('https://getcomp...')
#1 -(112): installComposer(false, false, 'composer.phar', false, false, false)
#2 -(14): process(Array)
#3 {main}
  thrown in - on line 574

PrinC avatar Nov 19 '15 16:11 PrinC

Duplicate of #4121

alcohol avatar Nov 23 '15 11:11 alcohol

This is network connection issue.

supermariogo avatar Dec 07 '16 08:12 supermariogo

Failed to decode zlib stream how to solve this issue

creativeshuvo avatar Mar 22 '17 15:03 creativeshuvo

may be you should use this command at ubuntu

sudo apt-get install zlibc

good luck

codebeautiful avatar Mar 29 '17 03:03 codebeautiful

how to solve the issue,in windows system?

Rbingo avatar Jun 15 '17 09:06 Rbingo

In windows, change zlib.output_compression=Off to on in php.ini file good luck

ekasolusi avatar Jun 20 '17 03:06 ekasolusi

hi ekasolusi thanks.

Loetfi avatar Aug 08 '17 07:08 Loetfi

thanks @ekasolusi

AslanLau avatar Jan 02 '18 08:01 AslanLau

thanks @ekasolusi

standibi avatar Jan 26 '18 13:01 standibi

Thanks it work

SamiChagar avatar Oct 02 '18 20:10 SamiChagar

In windows, change zlib.output_compression=Off to on in php.ini file good luck

Thank you so much @ekasolusi

Riowaldy avatar Dec 07 '18 17:12 Riowaldy

In windows, change zlib.output_compression=Off to on in php.ini file good luck

Thanks its work! Great

profdalem avatar Dec 14 '18 10:12 profdalem

https://github.com/composer/composer/issues/4619#issuecomment-309631946

thanks this works

abkisakye avatar Dec 11 '19 11:12 abkisakye

In windows, change zlib.output_compression=Off to on in php.ini file good luck

Thankyou It work! but first time i've just write "On" and still error the value is must be "on"

wahyusa avatar Sep 07 '20 07:09 wahyusa

thanks this works

muhammadabdelsalam2 avatar Apr 04 '22 14:04 muhammadabdelsalam2

Try to enable fileinfo extension fromini file

khalidJA avatar Aug 06 '22 15:08 khalidJA

In windows, change zlib.output_compression=Off to on in php.ini file good luck

i was about to make this change, but i press retry previously and then it worked, is mine gonna have bug or something? im worried lol

Arikowid31 avatar Dec 29 '22 13:12 Arikowid31

what if it happened in Docker?

yasyaindra avatar Jul 17 '23 08:07 yasyaindra

may be you should use this command at ubuntu

sudo apt-get install zlibc

good luck

It works in some case, I've installed apt-get install zlibc on-premise server but Not Works. it also depending on your Internet Provider and Firewall 😄 make sure http not blocked and your internet provider or firewall (i.e Fortigate) doesn't limit anything

hhaswan avatar Jan 30 '24 08:01 hhaswan

I know this is closed, old and from 2015, but for Debian Bookworm, this seems to solve the issue:

sudo apt install zlib1g

inuitviking avatar Mar 05 '24 08:03 inuitviking