What are common errors encountered during PEAR installation in PHP, and how can they be resolved?

One common error encountered during PEAR installation in PHP is the "pear command not found" error. This usually occurs when the PEAR executable is not in the system's PATH. To resolve this, you can manually add the PEAR executable path to the PATH environment variable.

export PATH=$PATH:/path/to/pear
```

Another common error is the "Permission denied" error when trying to install PEAR packages. This can be resolved by running the installation command with elevated privileges using sudo.

```php
sudo pear install package_name