Linux 如何从一个 PHP 安装中卸载 PEAR,然后使用另一个现有的 PHP 安装来安装它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8318477/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to uninstall PEAR from one installation of PHP and then install it with another existing PHP installation
提问by fronzee
I have two installations of php on my server. One version of php is 5.2.0 configured with pear, and the other is 5.2.9 configured --without-pear
. My server is running Red Hat Enterprise Linux AS release 4 (Nahant Update 9).
我在我的服务器上安装了两个 php。一个版本的php是5.2.0配置pear,另一个是5.2.9配置--without-pear
。我的服务器正在运行 Red Hat Enterprise Linux AS 版本 4(Nahant 更新 9)。
I would like to uninstall pear (and also PHPUnit) from php 5.2.0, and then reinstall it as part of the 5.2.9 version of php. The pear installation docs don't really cover this type of a situation, although they do tell Linux users to "consult the documentation for the respective distribution" in the event that they want to install pear with a version of php that was configured --without-pear
. I am having trouble finding such documentation, and even if I did, I am not sure how to remove the existing pear installation first.
我想从 php 5.2.0 中卸载 pear(以及 PHPUnit),然后将其重新安装为 5.2.9 版 php 的一部分。pear 安装文档并没有真正涵盖这种情况,尽管它们确实告诉 Linux 用户,如果他们想使用已配置的 php 版本安装 pear,请“查阅相应发行版的文档” --without-pear
。我很难找到这样的文档,即使我找到了,我也不知道如何先删除现有的梨安装。
采纳答案by fronzee
Here is a partial answer to my own question: After trial and error, I discovered that you can uninstall pear by running this command:
这是我自己的问题的部分答案:经过反复试验,我发现您可以通过运行以下命令来卸载梨:
$ sudo pear uninstall pear
$ sudo pear uninstall pear
I would like to see this added to the official pear docs, since they don't mention uninstalling pear at all.
我希望看到这个添加到官方 pear 文档中,因为他们根本没有提到卸载 pear。
回答by Will Bickford
Use the Command Help
使用命令帮助
pear help
You'll see the uninstall command listed in the output. :)
您将看到输出中列出的卸载命令。:)
Output
输出
Commands: build Build an Extension From C Source bundle Unpacks a Pecl Package channel-add Add a Channel ... uninstall Un-install Package ...