Mac系统版本:macOS 10.14
PHP版本:7.2.8
1.下载Yar安装包:https://github.com/laruence/yar
2.下载解压到指定目录进行编译安装
(1)/Applications/MAMP/bin/php/php7.1.20/bin/phpize --with-php-config=/Applications/MAMP/bin/php/php7.1.20/bin/php-config
(2)./configure --with-php-config=/Applications/MAMP/bin/php/php7.2.8/bin/php-config
可能出现的报错:

curl组件报错解决方式:
修改yar源码config.m4中curl目录为:/usr/local/opt/curl

(3)make && make install
3.ini文件中添加扩展
extension=yar.so
4.phpinfo()中查看

网友评论