2013-03-11 64 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