2

I'm a little confused about the reasoning behind installing PEAR through CLI like this:

//shell
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?

Hennes
  • 65,804
  • 7
  • 115
  • 169
Stann
  • 540

1 Answers1

2
  1. letting the package manager of your distribution make the work has the benefit of having always a consistent system. no missing deps, no conflicting versions. if you deinstall something, the package manager removes what it has installed.
    if you are downloading and unzipping the stuff you want to install and fiddling with the deps, then you are the download manager. things which can be automated should be automated.

  2. in your case:

    % dpkg -L php-pear
    
akira
  • 63,447