我在 redhat 上使用 php 5.2.10。默认安装的 pear 包是 PEAR 1.8.0。现在我想通过 pear 安装 PHPunit。因此,每当我运行命令安装 phpunit 时,都会出现错误:
pear install --alldeps phpunit/PHPUnit
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.2), installed version is 1.8.0
phpunit/PHPUnit can optionally use PHP extension "dbus"
phpunit/DbUnit requires PEAR Installer (version >= 1.9.2), installed version is 1.8.0
phpunit/File_Iterator requires PEAR Installer (version >= 1.9.2), installed version is 1.8.0
phpunit/PHP_CodeCoverage requires PEAR Installer (version >= 1.9.1), installed version is 1.8.0
phpunit/PHP_CodeCoverage requires package "phpunit/File_Iterator" (version >= 1.2.2)
phpunit/PHP_CodeCoverage can optionally use PHP extension "xdebug" (version >= 2.0.5)
phpunit/PHPUnit_MockObject requires PEAR Installer (version >= 1.9.2), installed version is 1.8.0
phpunit/PHPUnit_Selenium requires PEAR Installer (version >= 1.9.2), installed version is 1.8.0
phpunit/PHP_TokenStream requires PEAR Installer (version >= 1.9.1), installed version is 1.8.0
No valid packages found
install failed
我试过命令升级梨:
pear upgrade pear
pear upgrade --force pear
但它返回:
Nothing to upgrade
有什么解决办法吗?