yaf是基于php的一个扩展框架。笔者使用某ide时遇到个问题,无法解析yaf语法, 先安装yaf插件。编译错误
fatal error 'pcre2.h' file not found
上网查了一下, 据说是要创建软连接, 笔者用的homebrew, 不太清楚brew安装php之后的路径, 于是在终端里找了找, 最终得到以下命令:
ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/Cellar/php/8.1.4/include/php/ext/pcre/pcre2.h
注意, 实现你得安装完pcre, 正常情况下homebrew在初始安装时就会把两个版本的都安装好的。