Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法在redhat上将PEAR 1.8.0升级到更高版本_Php_Phpunit_Pear_Redhat - Fatal编程技术网

Php 无法在redhat上将PEAR 1.8.0升级到更高版本

Php 无法在redhat上将PEAR 1.8.0升级到更高版本,php,phpunit,pear,redhat,Php,Phpunit,Pear,Redhat,我在redhat上使用PHP5.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 optiona

我在redhat上使用PHP5.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:

pear upgrade pear
pear upgrade --force pear
但它的回报是:

Nothing to upgrade

有什么解决方案吗?

如果使用RHEL 6,则php pear>=1.9.4 您只需通过yum进行更新,比如yum安装php-pear


但是如果您这样做,它可能也会更新您的php安装。您将有一个要更新的所有包的列表,您可以选择接受或取消。

如果您使用RHEL 6,则php pear>=1.9.4 您只需通过yum进行更新,比如yum安装php-pear

但是如果您这样做,它可能也会更新您的php安装。您将有一个要更新的所有包的列表,您可以选择接受或取消。

如果pear告诉您“无需升级”,您应该清除缓存:

$ pear clear-cache
$ pear upgrade pear
如果pear告诉您“无需升级”,则应清除缓存:

$ pear clear-cache
$ pear upgrade pear
请尝试以下命令:

pear upgrade --force http://pear.php.net/get/PEAR-1.9.4.tar
它将下载pear 1.9.4的tar并升级版本。
如果它不工作,请检查您的php是否支持.zlib。 如果不支持,则通过以下命令使用.zlib配置php:

./configure --with zlib
通过浏览器上的phpinfo命令检查此项,它将在您的php信息页面中支持zlib。
运行上述命令升级pear版本,并通过以下方式进行检查:

pear version
它会将您的pear版本显示为1.9.4

然后运行命令:

pear install --alldeps phpunit/PHPUnit
请尝试以下命令:

pear upgrade --force http://pear.php.net/get/PEAR-1.9.4.tar
它将下载pear 1.9.4的tar并升级版本。
如果它不工作,请检查您的php是否支持.zlib。 如果不支持,则通过以下命令使用.zlib配置php:

./configure --with zlib
通过浏览器上的phpinfo命令检查此项,它将在您的php信息页面中支持zlib。
运行上述命令升级pear版本,并通过以下方式进行检查:

pear version
它会将您的pear版本显示为1.9.4

然后运行命令:

pear install --alldeps phpunit/PHPUnit