Installing PEAR

The Getting and installing the PEAR package manager page should help you : it gives informations on how to install the PEAR package manager, on both windows, Linux, and Mac.


Basically, if your Linux distribution comes with a PEAP package, you should install it.

For instance, on Ubuntu1, there is a php-pear package ; so, you'd use :

apt-get install php-pear


Else, if it doesn't, with a version of PHP >= 5.3, you should be able to use this :

$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar

With PHP 5.1, though, this is not going to work, as phar support has been added in PHP 5.3...


As a sidenote : PHP 5.1 is really outdated !

PHP 5.3 is more than one year and a half old ; even PHP 5.2 is not maintained anymore... maybe you should consider upgrading ?


1It seems you are running some kind of Redhat-based distribution, but I don't have one of those, so I cannot say if there is a PEAR package for it -- there is probably one, though.


--without-pear only means that the PEAR bits were not immediately created when PHP was compiled.

This usually happens when an operating system vendor that provides packages and wants to split off bits and pieces into their own individually installable parts.

Given the age of the PHP you're talking about, you're probably on RHEL or a derivative like CentOS. Check the package manager for a php-pear package.

Tags:

Php