Macos开启Swoole的Openssl
本来呢我的macos上已经安装好了 swoole v5.1.4
查看信息
执行 php --ri swoole
CodeBlock Loading...
但是我在使用 Guzzle
包的时候提示给我如下报错error.ERROR: you must configure with
--enable-openssl to support ssl connection when compiling Swoole
好吧没办法只能重新编译安装了
安装 openssl
CodeBlock Loading...
重新编译安装 swoole v5.1.4
CodeBlock Loading...
然后没有意外的在这个时候就意外发生了。报错了,报错如下
CodeBlock Loading...
解决方案
ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/Cellar/php/8.3.12_1/include/php/ext/pcre/pcre2.h
然后继续执行 make && make install
安装后查看信息
这个时候咱们再执行一次 php --ri swoole
CodeBlock Loading...
然后再请求使用 Guzzle
包发现已经好了