无法通过pear安装PHPUnit

use*_*771 7 php pear phpunit

可能重复:
通过PEAR安装PHPUnit

phpunit的安装说明正在运行:

pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
Run Code Online (Sandbox Code Playgroud)

第一个没关系,第二个我得到一个错误:

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
Run Code Online (Sandbox Code Playgroud)

我刚刚使用来自php.net(php 5.3.0)的最新go-pear.phar版本安装了梨,也尝试运行php go-pear.php梨网站说.

运行pear -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

小智 12

尝试键入控制台:

pear upgrade pear
Run Code Online (Sandbox Code Playgroud)


use*_*771 7

我找到了我的解决方案('cweiske'在irc.efnet.nl #pear) -

  1. 我删除了我的梨文件夹:

    C:\Program Files\Zend\ZendServer\bin

  2. 将php设置include_path为:

    C:\Program Files\Zend\ZendServer\bin\pear

  3. 得到了go-pear.php来自:

    http://pear.php.net/go-pear

    保存文件go-pear.php,我保存到C:\Program Files\Zend\ZendServer\bin

  4. 运行php go-pear.php设置PHP代码目录为include_path

    C:\Program Files\Zend\ZendServer\bin\pear

一切正常

我正在运行1.9.0.