install pear on OSX Mountain Lion

Install PEAR on your OSX Mountain Lion machine to easily install PHP libraries.

$ which pear
-bash: pear: command not found

Install pear.
Accept the defaults while installing.

$ cd /usr/local
$ sudo wget -O
$ sudo php -d detect_unicode=0 go-pear.phar

Pear is installed!

$ which pear

Now you can install some nice libraries:

  • PHP Mess Detector: detect possible bugs, suboptimal code and unused parameters, methods, properties¬†
  • PHP Code Sniffer: detect violations against (your own set) coding standards
  • PHP Unit




Leave a Reply

Your email address will not be published. Required fields are marked *