2015-02-11 68 views
13

我试图用这个命令来告诉pear是在哪里可以找到PHPUnit的:问题,而安装pear.phpunit.de/PHPUnit

sudo pear channel-discover pear.phpunit.de 

产量为:

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 (received: HTTP/1.1 410 Gone 
)) 
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" (File https://pear.phpunit.de:443/channel.xml not valid (received: HTTP/1.1 410 Gone 
))) 

我试着以下命令:

sudo pear channel-update pear.php.net 
sudo pear upgrade-all 

然后我再次运行channel-discover命令。如上所示,我得到了同样的错误。
我甚至尝试以下命令:

sudo pear config-set auto_discover 1 

输出:

config-set succeeded 

然后我尝试下面的命令:

sudo pear install pear.phpunit.de/PHPUnit 

输出:

Attempting to discover channel "pear.phpunit.de"... 
Attempting fallback to https instead of http on channel "pear.phpunit.de"... 
unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit" 
invalid package name/package file "pear.phpunit.de/PHPUnit" 
install failed 

所以我VISI查看此链接:https://pear.phpunit.de/channel.xml并显示410 gone错误。有没有其他的替代方法来做到这一点?

回答

3

大多数人只是现在作曲家。但既然你似乎是在Ubuntu上,你总是可以做:

sudo apt-get install phpunit 
0

下载药业档案工作对我来说:

https://github.com/Mayflower/PHP_CodeBrowser

wget https://github.com/mayflower/PHP_CodeBrowser/releases/download/1.1.1/phpcb-1.1.1.phar 
mv phpcb-1.1.1.phar /usr/local/bin/phpcb 
chmod a+x /usr/local/bin/phpcb 

phpcb --version 
PHP_CodeBrowser version 1.1.1 
0

对于那些在RHEL发行版(CentOS的/ Fedora的/等等),还没有使用作曲家,你可以使用YUM安装phpunit:

yum install phpunit