php 命令工具 pecl 不存在如何安装


php中有 peclpear 。pecl 是php社区扩展库 , pear PHP扩展和应用仓库 。两者都是增强php功能的扩展。pear 的写扩展使用 php 代码写的,属于应用层的扩展。而 pecl 的扩展通常是c写的,用来扩展php的底层功能。比如多线程 、异步 。

pecl 和 pearh

pecl (The PHP Extension Community Library)
pear(PHP Extension and Application Repository)



cd /usr/local/php/bin
phar  phar.phar  php  php-config  phpdbg  phpize

pecl 安装的步骤

wget -O go-pear.php
./php go-pear.php

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : /usr/local/php
 2. Temporary directory for processing            : /tmp/pear/install
 3. Temporary directory for downloads             : /tmp/pear/install
 4. Binaries directory                            : /usr/local/php/bin
 5. PHP code directory ($php_dir)                 : /usr/local/php/share/pear
 6. Documentation directory                       : /usr/local/php/docs
 7. Data directory                                : /usr/local/php/data
 8. User-modifiable configuration files directory : /usr/local/php/cfg
 9. Public Web Files directory                    : /usr/local/php/www
10. System manual pages directory                 : /usr/local/php/man
11. Tests directory                               : /usr/local/php/tests
12. Name of configuration file                    : /usr/local/php/etc/pear.conf

可以看到pecl 已经安装

pear  peardev  pecl  phar  phar.phar  php  php-config  phpdbg  phpize

pecl 安装 swoole

pecl install swoole