如何使用PEAR安装程序完全删除PHPUnit? [英] How can I remove completely PHPUnit using the PEAR Installer?

查看:159
本文介绍了如何使用PEAR安装程序完全删除PHPUnit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,我使用PEAR安装程序安装了PHPUnit(我也安装了Selenium RC以便在PHP中进行测试).现在我要卸载它(还要删除所有相关的文件夹和文件)

I installed PHPUnit using the PEAR installer a few days ago (I also installed Selenium RC for testing in PHP purpose). Now I want to uninstall it (also delete all related folders and files)

我运行了以下命令:

pear uninstall phpunit/PHPUnit

并显示控制台:

phpunit/PHPUnit not installed

我检查了PHPUnit文件夹,它还在吗?

I checked the PHPUnit folder, it was still there?

它是否已卸载?我尝试重新安装新的PHPUnit,但显示控制台:

Was it uninstalled? I try to reinstall a new PHPUnit, but the console displayed:

No releases available for package "pear.phpunit.de/PHPUnit"

如何重新安装它?

这是pear list -c pear.phpunit.de的输出:

以下是pear list -c pear.phpunit.de的输出:

推荐答案

我检查了PHPUnit文件夹,它还在吗?

I checked the PHPUnit folder, it was still there?

这可能是由于子组件(扩展,框架)引起的.但是,您不必为此担心.

That might be because of sub-components (Extensions, Framework). However you must not be concerned about that.

要安装最新版本,请执行以下两个命令:

To install the latest version, do the following two commands:

> pear config-set auto_discover 1
config-set succeeded

> pear upgrade
...

这将花费一些时间,并将更新当前安装的所有内容.由于您已经有了一些扩展,并且最新版本的PHPUnit可能需要这些扩展,因此请对其进行更新以防止在下一个命令中失败:

This will take some time, and will update all that is currently installed. As you have some extensions already available and the latest version of PHPUnit might require those, so update them to prevent failure in the next command:

> pear install pear.phpunit.de/PHPUnit

现在应该安装它:

Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.0.0)
downloading PHPUnit-3.6.7.tgz ...
Starting to download PHPUnit-3.6.7.tgz (118,349 bytes)
..........................done: 118,349 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.6.7

梨故障排除

正如您在评论中报告的那样,此操作无法解决.梨可能处于不知道顶部和底部在哪里的状态.时间到了.首先,清除缓存:

As you reported in comments, this did not work out. Probably pear is in a state that it does not know where top and bottom is. Time to force. First, clear the cache:

> pear clear-cache
reading directory C:\...\Temp\pear\cache
0 cache entries cleared

然后强制更新频道:

> pear channel-update -f pear.php.net
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded

> pear channel-update -f pear.phpunit.de
Updating channel "pear.phpunit.de"
Update of Channel "pear.phpunit.de" succeeded

然后强制安装phpunit:

Then force the phpunit install:

> pear install -a -f phpunit/PHPUnit

这篇关于如何使用PEAR安装程序完全删除PHPUnit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆