可能重复:
通过 PEAR 安装 PHPUnit
phpunit 的安装说明正在运行:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
第一个没问题,第二个我收到错误:
phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is 1.7.2
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
我刚刚使用来自 php.net(php 5.3.0)的最新 go-pear.phar 版本安装了 pear,也尝试php go-pear.php
按照 pear 网站所说的那样运行。
runningpear -V
给了我 1.7.2 版本,当我运行pear upgrade PEAR
它说我的版本比当前 noe 1.9.0 新,如果运行pear upgrade -f PEAR
强制升级,它会下载文件并成功安装,但我仍然有版本 1.7.2 和无法安装 phpunit。
我正在运行 windows vista,php 5.3.0