在Windows部署swoole
1、Cygwin是一个在windows平台上运行的类UNIX模拟环境,下载地址https://www.cygwin.com/
2.开始安装cgywin,并安装所需软件
3.下载Swoole
- https://github.com/swoole/swoole-src/releases
- https://pecl.php.net/package/swoole
- https://gitee.com/swoole/swoole/tags
4.双击运行Cygwin软件,然后通过命令进入到swoole解压的源程序代码中,执行命令phpize,,可以生成编译的配置文件configure,上面生成编译的配置文件后,再输入命令./configure && make && make install等待编译完成
5.输入命令:php --ini,查看配置文件目录,vi /etc/php.ini查看是否有extension=swoole.dll扩展配置,php -m查看是否真有这个扩展

错误提示1:

下载apt-cyg,下载地址:https://github.com/transcode-open/apt-cyg,然后解压放到home目录下,重新执行 install apt-cyg /bin 。
错误提示2:

运行:apt-cyg install php-devel
错误提示3:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
hom目录运行:apt-cyg install autoconf
错误提示4:fatal error: pcre2.h: No such file or directory
重新点击cyg_win 安装包,重新分别安装:libpcre2-devel、pcre2,注意版本号,我这里选择最新的。
然后重新执行: ./configure 。
参考文章:https://www.linyufan.com/content/10/1882-1.html&wd=&eqid=f92a92890009fc88000000036489e1a5

浙公网安备 33010602011771号