Skip to content

Instantly share code, notes, and snippets.

@bencorlett
Forked from macek/pear-lion-install.md
Created September 5, 2012 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bencorlett/3647548 to your computer and use it in GitHub Desktop.
Save bencorlett/3647548 to your computer and use it in GitHub Desktop.
PEAR on OS X Lion

After upgrading to OSX Lion, I discovered that both PEAR and PECL had gone missing. It turns out that you have to re-install them, but luckily it's quite simple. I found this quick guide from Ruggero De Pellegrini on Google+, and thought I would share the info to save you the confusion:

  1. Download the installer curl http://pear.php.net/go-pear.phar > go-pear.php
  2. Start the installation procedure with sudo sudo php -q go-pear.php
  3. Select a new installation base ($prefix) e.g. /usr/local
  4. Proceed with the install.
  5. If there is no /etc/php.ini file yet, copy the default sudo cp /etc/php.ini.default /etc/php.ini
  6. Edit /etc/php.ini and change the line ;include_path = ".:/php/includes" to include_path = ".:/usr/local/share/pear"
  7. Add /usr/local/bin/ to your path if you haven't already, e.g. in .profile

To test it, run either pecl or pear in Terminal.app and see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment