简体   繁体   English

通过梨安装PHPUnit时出错

[英]Error on Install PHPUnit Through Pear

Installing PHPUnit via PEAR the install instructions for phpunit are running this: 通过PEAR安装PHPUnit,phpunit的安装说明正在运行:

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

But fails with this error: 但是由于以下错误而失败:

Notice: fwrite(): send of 105 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. 注意:fwrite():发送105个字节失败,错误码为errno = 10053。主机中的软件中止了已建立的连接。 in PEAR\\Downloader.php on line 1664 在第1664行的PEAR \\ Downloader.php中

Notice: fwrite(): send of 105 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. 注意:fwrite():发送105个字节失败,错误码为errno = 10053。主机中的软件中止了已建立的连接。 in C:\\xampp\\php\\pear\\PEAR\\Downloader.php on line 1664 在第1664行的C:\\ xampp \\ php \\ pear \\ PEAR \\ Downloader.php中

Discovering channel pear.phpunit.de over http:// failed with message: 通过http://发现频道pear.phpunit.de失败,并显示以下消息:

channel-add: Cannot open " http://pear.phpunit.de/channel.xml " (File http://pear.phpunit.de:80/channel.xml not valid (redirected but no location)) channel-add:无法打开“ http://pear.phpunit.de/channel.xml ”(文件http://pear.phpunit.de:80/channel.xml无效(已重定向,但没有位置))

Trying to discover channel pear.phpunit.de over https:// instead 尝试通过https://发现频道pear.phpunit.de

Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open " https://pear.phpunit.de/channel.xml " (Connection to `pear.phpunit.de:443' failed: 找不到频道“ pear.phpunit.de”(频道添加:无法打开“ https://pear.phpunit.de/channel.xml ”(与“ pear.phpunit.de:443”的连接失败:

An established connection was aborted by the software in your host machine.)) 建立的连接被主机中的软件中止了。))

How do you solve? 您如何解决?

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

Did you set the auto discover on? 您是否设置了自动发现? I do the following at it works correctly on Ubuntu Linux and Windows 7. 我在Ubuntu Linux和Windows 7上正常运行时执行以下操作。

Ubuntu: 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM