Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.