Mac M1 安装 php扩展Swoole

我的电脑环境,php7.4 + swoole 4.4.23
如果安装过程中有问题,请下面留言!!
加油干🤓

1,下载
git 下载地址: https://github.com/swoole/swoole-src/releases
下载命令:

wget https://github.com/swoole/swoole-src/archive/v4.4.23.tar.gz

3,解压

tar -zvxf v4.4.23.tar.gz

4,进入到解压过的目录

swoole-4.4.23

5,
输入你本地对应的php安装目录,例子:/xxx/xxx/phpize

/opt/homebrew/Cellar/php@7.4/7.4.27/bin/phpize

6,

./configure 

7,

make && make install 

8,

make test 

这一步扩展已经安装成功
9,修改php.ini 配置添加(一定在重点强调,在配置文件末尾添加)

extension=swoole.so

10,测试安装结果

php --ri swoole

执行完展示以下就代表成功了

swoole

Swoole => enabled
Author => Swoole Team <team@swoole.com>
Version => 4.4.23
Built => Feb 12 2022 21:54:33
coroutine => enabled
kqueue => enabled
rwlock => enabled
pcre => enabled
zlib => 1.2.11
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 262144 => 262144

扩展安装结束,进入swoole 项目目录启动swoole即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值