【问题标题】:Installing Predis Error : Download of "nrk/Predis" succeeded, but it is not a valid package archive安装 Predis 错误:“nrk/Predis”下载成功,但它不是有效的包存档
【发布时间】:2013-10-16 13:01:09
【问题描述】:

我有一个使用 PHP 5.5.4 的新 EC2 实例,我正在尝试从 Pear 安装 Predis。 每次我尝试从 pear 安装 Predis 时,都会出现以下错误。

有人知道为什么会这样吗?我用谷歌搜索了很多解决方案,但找不到答案

root@ip-xxx-xx-xx-xxx:/etc/nginx# pear install nrk/Predis
downloading Predis-0.8.4.tgz ...
Starting to download Predis-0.8.4.tgz (177,785 bytes)
.....................................done: 177,785 bytes
Parsing of package.xml from file "/tmp/pear/temp/pearxTtEHW/package.xml" failed
Download of "nrk/Predis" succeeded, but it is not a valid package archive
Error: cannot download "nrk/Predis"
Download failed
install failed

【问题讨论】:

    标签: php amazon-web-services redis pear predis


    【解决方案1】:

    PHP 5.5 改变了 unpack 的工作方式 (http://php.net/manual/en/migration55.incompatible.php),因此一些 PEAR 或 PECL 包不再兼容。您可以手动安装该软件包。我认为它也已在 pear 存储库中修复,但我不确定。但它尚未发布。

    【讨论】:

    【解决方案2】:

    似乎 Pear 无法从 tgz 存档安装。 使用 -Z, --nocompress 选项下载时,您必须明确请求未压缩的文件。

    所以,试试sudo pear install -Z package

    【讨论】:

      【解决方案3】:

      对此的最佳解决方案是升级 pear 安装程序使用的 PEAR 存档包,然后在安装或升级现有包时无需显式请求未压缩文件。

      $ sudo pear upgrade -Z Archive_Tar
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-08-29
        • 2012-04-22
        • 1970-01-01
        • 1970-01-01
        • 2011-10-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多