How To install PEAR on OSX 10.11 El Capitan


Following are the instruction on how to install PEAR on OSX 10.11 El Capitan..

Pear is a PHP package manager and sad news is that it doesn’t come by as default application in OS X, in the following tutorial i’ll tell you how to install PEAR on OSX 10.11 El Capitan.

install pear on OSX el capitan

How To install PEAR on OSX 10.11 El Capitan:

  • First open Terminal on your Mac.
  • Now enter the following commands as mentioned.
  • Move into your home directory.


Check version

pear version

  • If pear is not installed then use the following command.

curl -O

  • Once its downloaded, use the following command to install it.

php -d detect_unicode=0 go-pear.phar

  • Now wait for process to start and when you see beginning installation. Press Enter.
  • Once installation is completed, now you have to add pear to your shell path. Use the following command.


nano .bash_profile

  • Use the following command to add to your path.


  • After adding the path you’ll following line in result.

export PATH=”/usr/local/mysql/bin:/Users/USERNAME/pear/share/pear/:$PATH”

  • Now you have to refresh the file and check pear version.

source .bash_profile

pear version

Now that Pear is installed on your OSX El Capitan, lets add the Pear path to your PHP install.

  • First let us locate PHP on your OSX. Type the following command.

php –ini

  • Once you got the path, now all you have to do is add into php.ini file.

include_path = “.:/Users/YOURUSERNAME/pear/share/pear/”

  • Now to check pear packages list.

pear list

All done…..

On Techbeasts, Ali Raza shares his experiences about the Gadgets he uses, He loves to collect different wallpapers for his Android, Apple smartphones, and his laptops, so he also brings you the best wallpapers for your devices.

Got a question/query or a suggestion? Drop it below.