21.1. Using the PEAR Package Manager
Problem
You want to use the PEAR package manager, pear. This allows you to install new packages, and upgrade and get information about your existing PEAR packages.
Solution
To execute a command with the PEAR package manager, type the command name as the first argument on the command line:
%pearcommand
Discussion
Here’s how to list all installed PEAR packages with
the list
command:[19]
% pear list
Installed packages:
= == == == == == == == == ==
+-----------------+----------+--------+
| Package | Version | State |
| Archive_Tar | 0.9 | stable |
| Console_Getopt | 0.11 | beta |
| DB | 1.3 | stable |
| HTTP | 1.2 | stable |
| Mail | 1.0.1 | stable |
| Mail_Mime | 1.2.1 | stable |
| Net_SMTP | 1.0 | stable |
| Net_Socket | 1.0.1 | stable |
| Net_URL | 1.0.4 | stable |
| PEAR | 0.91-dev | beta |
| XML_Parser | 1.0 | stable |
| XML_RPC | 1.0.3 | stable |
+-----------------+----------+--------+For a list of all valid PEAR commands, use
list-commands
. Many commands also have abbreviated
names; for example, list is also just
l. These names are usually the first few letters
of the command name. See Table 21-1 for a list of
frequently used commands.
Table 21-1. PEAR package manager commands
|
Command name |
Shortcut |
Description |
|---|---|---|
|
|
|
Download and install packages |
|
|
|
Upgrade installed packages |
|
|
|
Remove installed packages |
|
|
|
List installed packages |
|
|
|
List all available upgrades ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access