Folks, this time we’ll learn to install PEAR on Apple’s operating system. This guide should also be compatible with earlier operating systems in the apple family, such as Snow Leopard and Lion.
Well, let’s share the recipe.
Open the Terminal and check whether PEAR is already installed with the following command.
| |
If it isn’t installed, the command’s output should look like:
| |
If you saw the message above, then we can install pear, because it isn’t on your operating system.
Run the following command to select a directory and download the pear installation package:
| |
Finally, let’s install pear:
| |
Just check the specified PATH, if you need to customize your installation, make the necessary changes, in my case I didn’t change a single line and pressed ENTER straight away.
The Script will also ask whether you want to update the include_path of PHP by adding PEAR, press Y (Yes) followed by ENTER.
Now let’s add PEAR to your user’s PATH.
Type the following commands in the Terminal.
| |
Add the following line immediately after the last path in the PATH variable:
/Users/nome-do-seu-usuario/pear/bin/
Save the file and run the following command in the Terminal:
| |
You should see something like the output shown below:
| |
If you saw the output above, then PEAR was installed successfully on your machine. Otherwise, check the commands mentioned above again and see whether there was a syntax error.
If you’re having trouble installing pear or manage to install it through this guide, please leave your comment.