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?

1 Answer 1

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
    
1
  • 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, 2011 at 17:03

You must log in to answer this question.

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