Download of "pecl/event" succeeded, but it is not a valid package archive

Pear doesn't work properly after upgrade to PHP 5.6

Submitted by Mathew Branwell on Sun, 10/25/2015 - 13:23

After upgrade to PHP 5.6 Pear stopped to work properly giving lot's of "Download of "pear/package_name" succeeded, but it is not a valid package archive". To fix this I had to:


# pear upgrade Archive_Tar
downloading Archive_Tar-1.4.0.tgz ...
Starting to download Archive_Tar-1.4.0.tgz (x bytes)
.......done: x bytes
could not extract the package.xml file from "/tmp/pear/download/Archive_Tar-1.4.0.tgz"
Download of "pear/Archive_Tar" succeeded, but it is not a valid package archive
Error: cannot download "pear/Archive_Tar"
Download failed
upgrade failed
# cd /tmp/pear/download/
# tar -zxvf Archive_Tar-1.4.0.tgz
package.xml
Archive_Tar-1.4.0/Archive/Tar.php
Archive_Tar-1.4.0/docs/Archive_Tar.txt
# mv /usr/share/pear/Archive/Tar.php /usr/share/pear/Archive/Tar.php.org
# cp /tmp/pear/download/Archive_Tar-1.4.0/Archive/Tar.php /usr/share/pear/Archive/

and now I can run 'pear upgrade-all' without any issues.

Alternatviely, after upgrading to PHP 5.6 you can completely remove and re-install PEAR from remi repository:


yum erase php-pear
yum install --enablerepo=remi --enablerepo=remi-php56 php-pear

转载于:https://my.oschina.net/u/3417592/blog/1554060

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值