如何使用 PEAR 安装程序完全删除 PHPUnit?
几天前,我使用 PEAR 安装程序安装了 PHPUnit(我还安装了 Selenium RC 用于 PHP 测试)。现在我想卸载它(同时删除所有相关的文件夹和文件)
我运行了以下命令:
pear uninstall phpunit/PHPUnit
控制台显示:
phpunit/PHPUnit not installed
我检查了 PHPUnit 文件夹,它仍然存在吗?
是不是被卸载了?我尝试重新安装新的 PHPUnit,但控制台显示:
No releases available for package "pear.phpunit.de/PHPUnit"
How can I reinstall it?
以下是 pear list -c pear.phpunit.de
的输出:
这是 pear list -c pear.phpunit.de
的输出:
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)
I ran the following command:
pear uninstall phpunit/PHPUnit
and the console displayed:
phpunit/PHPUnit not installed
I checked the PHPUnit folder, it was still there?
Was it uninstalled? I try to reinstall a new PHPUnit, but the console displayed:
No releases available for package "pear.phpunit.de/PHPUnit"
How can I reinstall it?
Here's the output of pear list -c pear.phpunit.de
:
Here's output of pear list -c pear.phpunit.de
:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能是因为子组件(扩展、框架)。不过你不必担心这一点。
要安装最新版本,请执行以下两个命令:
这将需要一些时间,并将更新当前安装的所有内容。由于您已经有一些可用的扩展,并且最新版本的 PHPUnit 可能需要这些扩展,因此请更新它们以防止下一个命令失败:
现在应该安装它:
PEAR 故障排除
正如您在评论中报告的那样,这没有成功。大概梨子处于一种不知道上下在哪里的状态吧。是时候给力了。首先,清除缓存:
然后强制频道更新:
然后强制安装 phpunit:
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:
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:
This should now install it:
Troubleshooting PEAR
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:
Then force channel updates:
Then force the phpunit install:
由于谷歌将这个问题称为“如何删除它”,因此回答这个问题似乎很重要。
作为 root,使用:
在此处找到这个答案
As Google referenced this question as "how to REMOVE it", it seems important to answer the question.
As root, use:
Found this answer here