2015年1月5日 星期一

pear could not extract the package.xml


sudo pear -d preferred_state=alpha install Net_Gearman-0.2.3
downloading Net_Gearman-0.2.3.tgz ...
Starting to download Net_Gearman-0.2.3.tgz (17,572 bytes)
......done: 17,572 bytes
could not extract the package.xml file from "/build/buildd/php5-5.3.10/pear-build-download/Net_Gearman-0.2.3.tgz"
Download of "pear/Net_Gearman" succeeded, but it is not a valid package archive
Error: cannot download "pear/Net_Gearman"
Download failed
install failed
這裝不起來是因為目前的php-pear的版本跟php本身的版本不同,所以才會導致裝不起來
php-pear的版本
dpkg --list | grep php-pear
ii  php-pear                         5.3.10-1ubuntu3.15                    PEAR - PHP Extension and Application Repository
php的版本
php -v
PHP 5.5.20-1+deb.sury.org~precise+1 (cli) (built: Dec 21 2014 19:54:33)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies  
這問題其實我本來也一直找不到為什麼,後來突發起想,想說來upgrade一下,可能搞不好就好了,結果被我誤打誤撞弄出來,其實細心一點看error訊息,就很容易找到問題了。
could not extract the package.xml file from "/build/buildd/php5-5.3.10/pear-build-download/Net_Gearman-0.2.3.tgz"
解法:
apt-get update
apt-get upgrade
sudo pear -d preferred_state=alpha install Net_Gearman-0.2.3

沒有留言:

張貼留言