[SOLVED][PHP PEAR] How to fix the error 'could not extract the package.xml file' and 'Download of "pecl/uploadprogress" succeeded, but it is not a valid package archive', when trying to install PECL uploadprogress using PHP PEAR on Ubuntu 14.04 Trusty
Setting up, upgrading and maintaining a clean and functional Drupal/PHP Development environment is an art, and quite a piece of cake for the skilled sysadmin. But the ever changing versions of OS packages and dependencies can bring up quite some unexpected challenges to a budding developer. Here is the solution to one such error that might eat your brains out.
Almost all usable versions of Drupal - 6, 7 and 8 - use PECL uploadprogress to show file upload progress.
And installing it on previous Ubuntu, PHP versions was as easy as running the following command:
sudo pecl install uploadprogress
But lately, when trying to install uploadprogress on fresh Ubuntu 14.04.1 Trusty Tahr the same way, it has been showing up the following error:
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/uploadprogress-1.0.3.1.tgz" Download of "pecl/uploadprogress" succeeded, but it is not a valid package archive Error: cannot download "pecl/uploadprogress" Download failed install failed
Solution:
To work around this without breaking your package manager's system, you can install by telling the command (using the '-Z' option) to download the uncompressed version of the archive while installing.
For the above case, you can use the following command:
sudo pecl install -Z uploadprogress
- 40445 reads
Comments
Ankur Garg (not verified)
Sat, 01/17/2015 - 17:45
Permalink
Facing the same problem when installing Pear package for malling
This work for me. I want to install the following packages
sudo pear install mail
sudo pear install Net_SMTP
sudo pear Auth_SASL
sudo pear install mail_mime
but it gives me the same error which you face. I just add "-Z" before the package name e.g. "sudo pear install -Z Net_SMTP" and it works.
Thanks for this lovely sharing....
venat (not verified)
Wed, 02/25/2015 - 12:37
Permalink
Thank you
Wow.. its working fine..
Julio Vinachi (not verified)
Fri, 09/04/2015 - 21:25
Permalink
Very Thanks
thanks i need
sudo pecl install -Z dbase
, and run ok. my server is very good. thanks for you help.Julio Vinachi (not verified)
Tue, 09/08/2015 - 17:55
Permalink
Very Thanks
thanks for you help.
is fine all the code.
David (not verified)
Sat, 11/21/2015 - 15:45
Permalink
Thanks - helped with redis
I have been knocking my head against a wall trying to run "sudo pecl install redis" with failures even though I could see the files there fine, could extract them etc.
Adding the -Z to make "sudo pecl install -Z redis" worked fine! Thanks.
Josias Dossougoin (not verified)
Thu, 06/16/2016 - 16:09
Permalink
Great work around. It works
Great work around. It works fine ! Many thanks.
Add new comment