macOS 上安装 PECL

摘要:
1、 简介PECL(PHP扩展社区库)是一个PHP扩展库,为所有PHP扩展提供托管和下载服务。PECL扩展可以通过PEAR(PHPExtension and Application Repository)的Package Manager的安装管理模式下载和安装。2、 安装官方提供了PEAR在各种平台上的安装模式。如果您想直接查看官方文件,请输入[Portal],mac

一、简介

PECL(The PHP Extension Community Library)是 PHP 扩展的存储库,为 PHP 所有的扩展提供提供托管和下载服务。

通过 PEAR(PHP Extension and Application Repository)的 Package Manager 的安装管理方式,可以对 PECL 扩展进行下载和安装。

二、安装

官方提供了 PEAR 在各个平台的安装方式,直接看官方文档的请进【传送门】,macOS 平台官方安装翻译如下。

1. 下载 PEAR

使用 curl 命令下载即可

curl -O https://pear.php.net/go-pear.phar

2. 安装 PEAR

使用 sudo 授权进行安装:

sudo php -d detect_unicode=0 go-pear.phar

安装过程需要进行简单的配置,如下:

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

1-12, 'all' or Enter to continue: 1

输入 1,将安装根目录修改为 /usr/local/pear; 
输入 4,将命令安装到 /usr/local/bin 目录; 
其它选项默认即可,一路回车。

3. 检测是否安装成功

出现如下结果,则安装成功

$ pear version
PEAR Version: 1.10.5
PHP Version: 7.1.7
Zend Engine Version: 3.1.0

三、相关连接

PECL 官方地址:http://pecl.php.net/ 
PEAR 官方地址:http://pear.php.net/

免责声明:文章转载自《macOS 上安装 PECL》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇unity Mathf 数学运算汇总L1与L2正则化下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

mac系统PHP 7.1.12安装xhprof并使用[View Full Callgraph]小记

前几天从php7.0.x 升级到了php7.2.0版本, 结果装xhprof没有找到能支持对应版本的xhprof 于是又安装了一个php7.1.2的版本(brew install h) 接着安装xhprof扩展 git clone https://github.com/longxinH/xhprof cd xhprof/extension/ /usr/...

Ganglia3.1.7安装与配置(收录)

一、所需要软件 二、安装过程     1、Ganglia运行平台的安装     2、Ganglia依赖库的安装     3、RRDTool的安装     4、Ganglia的安装 (包括使用yum方式安装) 三、简单配置 四、启动与访问 五、被监控节点上安装Ganglia (包括使用yum方式安装) 六、遇到的问题,及解决办法    流行的开源服务器集群监...

PHP学习(字符串操作)

   在PHP中,字符串的定义可以使用英文单引号' ',也可以使用英文双引号" "。单引号和双引号到底有啥区别呢?  PHP允许我们在双引号串中直接包含字串变量。而单引号串中的内容总被认为是普通字符。PHP中用英文的点号.来连接两个字符串。(注意输出的区别) 1 <?php 2 $i='I'; 3 $love=' Love'; 4 $you=...

PHP常用符号和函数

(转)最近在写PHP程序的时候发现了一些特殊的PHP符号,例如连续小于符号,三个小于符号,eot,eod,echo示例,print示例等,突然间 发现用这么久的PHP了,竟然连PHP的基本符号都没有认全,看到@号还查了半天才知道什么意思.把基本符号和一些外面常见的PHP符号整理成了列表,在我的博客上帖一下吧,需要的朋友们可以参考下PHP相关的特殊符号~注解...

mac 命令行大杂烩

一、实用的 1、代替 cat 的工具:bat,支持语法高亮、同时显示行号,使用: bat xx.yyy 安装:brew install bat 2、man 命令的替代品:tldr 安装:brew install tldr 二、好玩的 1、命令行显示动态的火焰,运行: aafire 安装: brew install aalib 2、命令行显示黑客帝国数字雨,...

WordPress in Windows And Uncaught Error: Call to undefined function mysql_connect()

下载 WordPress  https://cn.wordpress.org/download/#download-install  直接解压出来  打开 readme.html 有简单指引。  浏览器打开 wp-admin/install.php ,指的是通过 web 服务器 打开。浏览器直接打开是源代码。 web 浏览器本身也不支持 .php ,本次...