Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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?

share|improve this question
up vote 2 down vote accepted
  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
share|improve this answer
I will just mote that as a rule of thumb "If you can install it via a package manager, you should install it via a package manager." You may not see the advantage today but sooner or later you'll appreciate it. That said, only do it if the version available is suitable to your needs. I, personally, install nothing that cannot be installed via APT; everything else is too much work! – phogg Jan 18 '11 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .