During a pecl package installation, i got the error,
Download of "pecl/pecl_http" succeeded, but it is not a valid package archive
Error: cannot download "pecl/pecl_http"
This error is coming for all the packages. So i tried the solution given here, http://cweiske.de/tagebuch/pear-php-5.5.htm. But it is not working. And i don't have any other clue on this. It would be really helpful if someone explains what exactly the problem is. Please help.
This bug commonly affects systems upgraded to Ubuntu 14.04 LTS from Ubuntu 12.04 LTS.
There is a workaround for php5-5.5.9 as commented by kolAflash on Launchpad.
The workaround contains a small typo (tar
instead of tgz
), so I provide a working solution:
# First run pear to download the packages. It will probably put the packages into
# /build/buildd/php5-5.5.9+dfsg/pear-build-download/
# but it can't install them.
$ pear upgrade
# Un-Gzip the downloaded packages.
$ gunzip /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tgz
# Now pear should be able to work with the pure tar-files.
$ pear upgrade /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar
All credit for this workaround obviously goes to kolAflash.
Seems that Pear can't install from tgz archive. You have to explicitly request uncompressed files when downloading with -Z, --nocompress option.
So, try sudo pear install -Z
package
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With