【发布时间】:2013-09-04 09:41:55
【问题描述】:
在pear.phpunit.de/PHPUnit 中安装PHPUnit 未知通道pear.phpunit.de 时出错Debian-4 操作系统上的无效包名称/包文件“pear.phpunit.de/PHPUnit”。
我已按照http://phpunit.de/manual/3.7/en/installation.html 中包含的说明进行操作,并尝试了PHAR 方法和PEAR 方法,但均无效。
服务器设置如下:
PEAR Version: 1.9.4
PHP Version: 5.4.4-14+deb7u3
Zend Engine Version: 2.4.0
Running on: Linux lsh1001 3.9.6-hw+ #6 SMP
当我尝试使用PEAR 方法安装时,我运行:
pear config-set auto_discover 1
我收到了
config-set succeeded
但是,当我运行时
pear install pear.phpunit.de/PHPUnit
我收到:
Attempting to discover channel "pear.phpunit.de"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes
Auto-discovered channel "pear.phpunit.de", alias "pear.phpunit.de", adding to registry
unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit"
invalid package name/package file "pear.phpunit.de/PHPUnit"
install failed
我不熟悉使用命令行提示符,所以我可能会做一些奇怪的事情。我尝试在代码行前加上 sudo,但收到:
-bash: sudo: command not found
当我这样做时。
我希望能够使用浏览器前端而不是命令行安装来运行PHPUnit。我也尝试了PHAR 安装方法,但我不确定如何指向已安装的phpunit.phar 文件。我可以直接从命令行运行phpunit.phar 文件,但我如何在php.ini 文件中引用它?我已将文件留在我的根目录中并且没有移动它。
【问题讨论】: