composer: "Failed to decode zlib stream" when install

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

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 20 (1 by maintainers)

Commits related to this issue

Most upvoted comments

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

may be you should use this command at ubuntu

sudo apt-get install zlibc

good luck

This is network connection issue.

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”

what if it happened in Docker?

how to solve the issue,in windows system?