打zZ~瞌睡 Menu

Ubuntu 14.04下使用pear安装File_IMC

最近有个项目要使用File_IMC扩展,使用两种方法都出错

[email protected]:~# pear install -f File_IMC-beta
downloading File_IMC-0.5.0.tgz ...
Starting to download File_IMC-0.5.0.tgz (32,082 bytes)
.........done: 32,082 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/File_IMC-0.5.0.tgz"
Download of "pear/File_IMC" succeeded, but it is not a valid package archive
Error: cannot download "pear/File_IMC"
Download failed
install failed
[email protected]:~# php pyrus.phar install File_IMC
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /etc/php5/pear
Sorry there was an error retrieving pear2.php.net/File_IMC from the default channel
Pyrus\Channel\Exception: package File_IMC does not exist
 Pyrus\HTTPException: Download of http://pear2.php.net/rest/p/file_imc/info.xml failed, file does not exist
Google了一下说是因为Ubuntu升级到14.04的原因,使用-Z参数下载非压缩版本安装即可
[email protected]:~# pear install -Z File_IMC-beta
downloading File_IMC-0.5.0.tar ...
Starting to download File_IMC-0.5.0.tar (Unknown size)
....................................done: 167,936 bytes
install ok: channel://pear.php.net/File_IMC-0.5.0