2013-03-11 68 views
0

安装PHPUnit的PEAR通过安装的PHPUnit PHPUnit的用于安装指令运行以下命令:错误通过梨

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

但失败,此错误:

Notice: fwrite(): send of 105 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. in PEAR\Downloader.php on line 1664

Notice: fwrite(): send of 105 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. in C:\xampp\php\pear\PEAR\Downloader.php on line 1664

Discovering channel pear.phpunit.de over http:// failed with message:

channel-add: Cannot open " http://pear.phpunit.de/channel.xml " (File http://pear.phpunit.de:80/channel.xml not valid (redirected but no location))

Trying to discover channel pear.phpunit.de over https:// instead

Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open " https://pear.phpunit.de/channel.xml " (Connection to `pear.phpunit.de:443' failed:

An established connection was aborted by the software in your host machine.))

你怎么解决?

回答

-1

您是否设置了自动发现?我这样做在它正常工作在Ubuntu Linux和Windows 7

Ubuntu的:

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

的Windows:

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

的设置无关,用它做的 - 他明确地调用'channel-discover'。 – cweiske 2013-03-12 07:21:39

+0

坦克。问题在于互联网 – 2013-03-12 09:21:27

+0

我看到了,但还有其他渠道需要完成安装PHPUnit。没有这些,它也会失败。我相信你也需要components.ez.no和pear.symfony.com渠道。 – 2013-03-12 22:58:14

0
wget https://phar.phpunit.de/phpunit.phar 
chmod +x phpunit.phar 
mv phpunit.phar /usr/local/bin/phpunit