Pear doesn't work properly after upgrade to PHP 5.6
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
Comments
Dj (not verified)
Fri, 09/21/2018 - 06:45
Permalink
How to perform this under
How to perform this under windows OS?
Add new comment