版本要求:php >=7.0 Swoole4.4.13
想要编译必须要安装相应的依赖扩展库可以提前的下载这里使用yum来进行扩展安装,一般需要以下几个扩展支持,否则会出现错误!!!!!!
yum -y install gcc gcc-c++ libxml2-devel m4 autoconf pcre-devel make cmake bison openssl openssl-devel
2:安装swoole
Swoole安装方式跟php安装方式是一样的,下载解压、编译
cd swoole.4.4.16 phpize ./configure --with-php-config=/usr/local/phpstudy/soft/php/php-7.3.8/bin/php-config make sudo make install
注意 configure 最好直接指定你的php-config位置 查看php-config 位置 php -i | grep Config
添加extension=swoole.so 到php.ini
查看 php.ini
php -i|grep php.ini
查看是否添加成功swoole
php -m