【问题标题】:Error on Install PHPUnit Through Pear通过 Pear 安装 PHPUnit 时出错
【发布时间】:2013-02-26 20:54:10
【问题描述】:

通过 PEAR 安装 PHPUnit phpunit 的安装说明正在运行:

pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit

但失败并出现此错误:

注意:fwrite(): 发送 105 字节失败,errno=10053 An 已建立的连接被主机中的软件中止 机器。在 PEAR\Downloader.php 第 1664 行

注意:fwrite(): 发送 105 字节失败,errno=10053 已建立的连接被主机中的软件中止 机器。 在 C:\xampp\php\pear\PEAR\Downloader.php 第 1664 行

通过 http:// 发现通道 pear.phpunit.de 失败并显示消息:

频道添加:无法打开“http://pear.phpunit.de/channel.xml” (文件http://pear.phpunit.de:80/channel.xml 无效 (重定向但没有位置))

试图通过 https:// 发现频道 pear.phpunit.de 而是

发现频道“pear.phpunit.de”失败 (频道添加:无法打开“https://pear.phpunit.de/channel.xml” (连接到 `pear.phpunit.de:443' 失败:

已建立的连接被主机中的软件中止。))

你是怎么解决的?

【问题讨论】:

    标签: php phpunit pear


    【解决方案1】:
    wget https://phar.phpunit.de/phpunit.phar
    chmod +x phpunit.phar
    mv phpunit.phar /usr/local/bin/phpunit
    

    【讨论】:

      【解决方案2】:

      您是否设置了自动发现?我在 Ubuntu Linux 和 Windows 7 上正常工作时执行以下操作。

      Ubuntu:

      sudo pear upgrade PEAR
      sudo pear config-set auto_discover 1
      sudo pear install pear.phpunit.de/PHPUnit
      

      窗户:

      pear upgrade PEAR
      pear config-set auto_discover 1
      pear install pear.phpunit.de/PHPUnit
      

      【讨论】:

      • 设置与它无关 - 他明确调用channel-discover
      • 坦克。问题在于连接互联网
      • 我看到了,但是完成 PHPUnit 的安装还需要其他渠道。没有这些,它也会失败。我相信您也需要 components.ez.no 和 pear.symfony.com 频道。
      猜你喜欢
      • 2011-09-10
      • 2011-01-01
      • 2013-04-03
      • 2014-12-25
      • 2012-02-29
      • 2012-02-24
      • 2010-11-29
      • 2010-12-06
      • 2012-04-07
      相关资源
      最近更新 更多