Upgrading PEAR on RHEL 4
Problem: You need to install PEAR packages that use package.xml version 2.0 but you’re running the stock RedHat RPM of PHP which is at php-pear-4.3.9-22.i386.prm (aka pear 1.3.1).
pear upgrade Date
downloading Date-1.4.7.tgz ...
Starting to download Date-1.4.7.tgz (55,754 bytes)
.............done: 55,754 bytes
No handlers for package.xml version 2.0
You can’t upgrade PEAR using pear upgrade PEAR because you need at least pear-1.3.3 to get to the latest version.
requires package `PEAR' >= 1.3.3
PEAR: Dependencies failed
Solution:
- Download PEAR 1.3.3
- Install with
pear upgrade /path/to/pear-1.3.3 - Upgrade PEAR with
pear upgrade pear - Optional: Upgrade your existing packages with
pear upgrade-all
You may now install packages that use package.xml version 2.0. You are also ahead of the game with regard to RPMs. The next RHN update may hose what you have just done. You should probably consider marking php-pear as a package to ignore.
Update: As noted in the comments, you will need to upgrade to 1.4.11 before you can upgrade to 1.5.0.


January 9th, 2007 at 7:10 pm
Thanks a bunch!
January 22nd, 2007 at 2:18 pm
YUP A BUNCH. I Had so much trouble with this. Thanks though.
January 29th, 2007 at 11:05 am
Note that you can’t upgrade to 1.5.0 directly. I had to upgrade to 1.4.11.
January 29th, 2007 at 11:08 am
Ah, good to know. When I wrote this 1.4.11 was the latest release.
February 12th, 2007 at 12:26 pm
you saved me a lot of time … thanks
May 30th, 2007 at 1:13 pm
I used the method as well,
cause I had trouble using chanell feature, and I was using pear 1.3.6!
not really nice that I could not upgrade pear using pear 1.3.6 but I could using 1.3.3!
Anyway thanks,
now I did it, upgrading to 1.5.4!
June 27th, 2007 at 12:20 pm
Yes, thanks. Was getting annoyed. Asked bigG and found this. Had a bit of trouble but was able to get it ok.
September 5th, 2007 at 8:04 am
Thanks, this was just what I needed!
I was able to upgrade without manually downloading anything, with just this:
pear upgrade pear-1.3.3
pear upgrade pear-1.4.11
pear upgrade
(It’d be nice if PEAR were able to detect the problem and do the multistage upgrade itself, instead of just giving up and making the user find out what to do.)
October 31st, 2007 at 6:30 am
pear upgrade http://download.pear.php.net/package/PEAR-1.3.3.tgz http://download.pear.php.net/package/Console_Getopt-1.2.tgz http://download.pear.php.net/package/Archive_Tar-1.3.1.tgz
pear upgrade XML_RPC
pear upgrade -o pear
pear upgrade-all