fronzee
fronzee

Reputation: 1818

How to uninstall PEAR from one installation of PHP and then install it with another existing PHP installation

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

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.

Upvotes: 12

Views: 33933

Answers (2)

Will Bickford
Will Bickford

Reputation: 5386

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

Upvotes: 0

fronzee
fronzee

Reputation: 1818

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

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

Upvotes: 33

Related Questions