一、MAC安装swoole命令
pecl install swoole
二、解决ssl.h not found
如果报错ssl.h not found,解决方法如下:
pecl install swoole
enable sockets supports? [no]: yes
enable openssi support? [no]: yes --with-openssL-dir=/opt/homebrew/opt/openssl
其中的/opt/homebrew/opt/openssl改为你openssl的目录,请确认好。
三、解决pcre2.h not found
1、先安装pcre2
brew install pcre2
2、pcre软连接
ln -s /opt/homebrew/Cellar/pcre2/10.42/include/pcre2.h /opt/homebrew/Cellar/php@8.1/8.1.27_1/include/php/ext/pcre/pcre2.h
其中/opt/homebrew/Cellar/pcre2/10.42/include/pcre2.h和/opt/homebrew/Cellar/php@8.1/8.1.27_1/include/php/ext/pcre/pcre2.h改为你的目录,请确认好。
四、确认pcre软连接是否成功
进入/opt/homebrew/Cellar/php@8.1/8.1.27_1/include/php/ext/pcre目录,
cd /opt/homebrew/Cellar/php@8.


1412

被折叠的 条评论
为什么被折叠?



