DISQUS

ClickOnTyler.com: How To Install PEAR in Mac OS X Leopard - Click On Tyler Blog

  • Joel Taylor · 1 year ago
    You have to watch the default installation directory - this caught me off guard and didn't work the first time round because it installed in my User directory.
  • jjcalleiro · 1 year ago
    do you know if i can just move the whole directory to a different location and reference the change in php.ini?
  • Martin · 1 year ago
    That's exactly what I've been looking for! Clear and easy. Now, I'm going to check how to use pear to install additionnal packages... :-)
  • Justin · 1 year ago
    Worked for me, thank you kindly. I chose to use /usr/local for my install location instead of the default /Users/justin, to keep my home folder clean and make the installation available to all users of the system. Kudos on the simple quick instructions
  • Matt Connolly · 1 year ago
    My installation defaulted to install in "/Users/matt/pear" which was where I did the curl from.

    I had to manually enter the prefix as "/usr/share/pear" during the installation process.

    I also didn't need to edit the ini file, as the go-pear.php installer did it automatically for me.

    Thanks for the instructions.
  • Jason Calleiro · 1 year ago
    if i want to move my installation do i just move the the ones in my home folder to /usr/local/bin and in php.ini let it know?

    also how do i put it on my path to call commands without having to type out the full location?

    Thanks!
  • John McKerrell · 1 year ago
    Thanks for this, very useful :-)

    I needed to change the default install location as it was defaulting to the location that I saved go-pear.php (~/Downloads) but apart from that, worked well.
  • Rich · 1 year ago
    Thanks for this, got me off to a good start. However, I had built PHP from source and one weird thing that happens when you do that on a Mac is that the CLI PHP binary is called php.dSYM and not just PHP

    After following your guide, I got the following errors:

    Richs-MacBook-Pro:src rich$ pear
    /usr/local/bin/pear: line 28: /usr/local/php/bin/php: No such file or directory
    /usr/local/bin/pear: line 28: exec: /usr/local/php/bin/php: cannot execute: No such file or directory

    So, to get Pear up and happy, I just did:

    cd /usr/local/php/bin/
    sudo ln -s php.dSYM php

    I suppose you could do 'sudo mv php.dSYM php' to rename the binary instead of symlinking it.