文字

PECL 安装介绍

» PECL 是通过 » PEAR 打包系统来的 PHP 扩展库仓库,本章内容示范了怎样取得并安装 PECL 扩展。

以下指南中假定 /your/phpsrcdir/ 是 PHP 源程序的路径,extname 是 PECL 扩展库的名字。自己根据实际情况调整。此外还假定用户熟悉 » pear 命令。 PEAR 手册里 pear 命令的信息同样适用于 pecl

要使用共享扩展库,必须经过编译,安装,然后加载。以下说明的方法提供了怎样编译和安装扩展库的各种指导,但并不会自动加载它们。可以通过将其包括在 php.ini 中用 extension PHP 指令加载,或者 用 dl() 函数。

当编译 PHP 模块时,拥有各种工具(autoconf,automake,libtool 等)的已知好使的版本很重要。所需工具和所需版本的详情见» 匿名 Git 说明。

用户评论:

[#1] mjs at beebo dot org [2009-02-02 08:16:02]

If you are looking for the "pecl" executable (it should be installed in the same directory as your "php" binary), you may need to re-configure and compile PHP without the --without-pear option.  (--without-pear disables pecl as well as pear, though this doesn't appear to be documented anywhere, not even in the configure script...)

If the "pear command" link results in a 404, try:

http://pear.php.net/manual/en/guide.users.commandline.cli.php

上一篇: 下一篇: