Search code examples
phplinuxubuntupear

PEAR - why to install via CLI?


I'm a little confused about the reasoning behind installing PEAR through CLI like this (ubu ntu/debian):

sudo apt-get install php-pear

AFAIK Pear is just PHP library - so - that's just bunch of PHP classes. So - if I need one - I just go to their website, download one, plug it into my php code - and that's it. - right? or so I think.

so - my questions are:

1) Why would I install PEAR through command line? What are the benefits over just downloading and ungzipping a package?

2) If installed through CLI - Where those packages are being installed? what dir?

Thanks:)

UPDATE

In retrospect - if you have the same problems with PEAR - they have been addressed by pyrus installer. Right now - there is no need to install PEAR into single directory using apt-get or whatever. One can simply download pyrus installer (it's a single file) and install PEAR packages using pyrus installer file wherever you want. You can even have multiple PEAR packages location - no need top install it under /usr/php/pear or whatever. makes a lot more sense than PEAR installer.


Solution

    1. PEAR can resolve a package's dependencies much like apt does. You won't have to download dependency packages yourself.
    2. On debian, that's usually /usr/share/php