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.
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.
- If pear is not installed then use the following command.
curl -O http://pear.php.net/go-pear.phar
- 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.
- Use the following command to add to your path.
- After adding the path you’ll following line in result.
- Now you have to refresh the file and check 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.
- 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.