Institutional Knowledge

Wherein we write down some stuff that we know.

Institutional Knowledge header image 2

Upgrading PEAR on RHEL 4

November 27th, 2006 · 9 Comments

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:

  1. Download PEAR 1.3.3
  2. Install with pear upgrade /path/to/pear-1.3.3
  3. Upgrade PEAR with pear upgrade pear
  4. 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.

Tags: HOWTO · PHP

9 responses so far ↓

  • 1 Austin Swinney // Jan 9, 2007 at 7:10 pm

    Thanks a bunch!

  • 2 Alfred Nutile // Jan 22, 2007 at 2:18 pm

    YUP A BUNCH. I Had so much trouble with this. Thanks though.

  • 3 Christian G. Warden // Jan 29, 2007 at 11:05 am

    Note that you can’t upgrade to 1.5.0 directly. I had to upgrade to 1.4.11.

  • 4 pberry // Jan 29, 2007 at 11:08 am

    Ah, good to know. When I wrote this 1.4.11 was the latest release.

  • 5 Carlos Mafla // Feb 12, 2007 at 12:26 pm

    you saved me a lot of time … thanks

  • 6 Simone // May 30, 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!

  • 7 rjmolesa // Jun 27, 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.

  • 8 Daniel // Sep 5, 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.)

  • 9 kosta.ru // Oct 31, 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