如何从一个PHP安装中卸载PEAR,然后使用另一个现有的PHP安装来安装它

时间:2021-12-24 07:15:12

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配置了--with-pear。我的服务器正在运行Red Hat Enterprise Linux AS第4版(Nahant Update 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的一部分。梨安装文档并没有真正涵盖这种情况,虽然他们确实告诉Linux用户“查阅相应发行版的文档”,如果他们想安装带有配置的php版本的梨 - 没有梨。我无法找到这样的文档,即使我这样做了,我也不确定如何首先删除现有的pear安装。

2 个解决方案

#1


27  

Here is a partial answer to my own question: After trial and error, I discovered that you can uninstall pear by running this command:

以下是我自己问题的部分答案:经过反复试验,我发现您可以通过运行此命令卸载pear:

$ sudo pear uninstall pear

$ sudo梨卸载梨

I would like to see this added to the official pear docs, since they don't mention uninstalling pear at all.

我想看到这个添加到官方梨文档,因为他们根本没有提到卸载梨。

#2


0  

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
...

#1


27  

Here is a partial answer to my own question: After trial and error, I discovered that you can uninstall pear by running this command:

以下是我自己问题的部分答案:经过反复试验,我发现您可以通过运行此命令卸载pear:

$ sudo pear uninstall pear

$ sudo梨卸载梨

I would like to see this added to the official pear docs, since they don't mention uninstalling pear at all.

我想看到这个添加到官方梨文档,因为他们根本没有提到卸载梨。

#2


0  

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
...