未安装homebrew的话 先安装; /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
1、uname -a 查看当前架构;arm-64(M芯片) 需要切换架构为x86_64(Intel芯片)
切换架构: sudo arch -x86_64 zsh
2、sudo arch -x86_64 /Applications/MxSrvs/bin/php/bin/phpize
3、
sudo arch -x86_64 ./configure --enable-openssl --with-openssl-dir=/opt/homebrew/Cellar/openssl@3/3.2.1 --enable-http2 --with-php-config=/Applications/MxSrvs/bin/php/bin/php-config
3、sudo arch -x86_64 make && make install
4、php.ini 下面配置 extension=/Applications/MxSrvs/bin/php/lib/php/extensions/no-debug-non-zts-20190902/swoole.so