1.首先更新php版本,如果已經是最新的請忽略,
? ? (1)查看是否安裝php
brew search php
? ? ?(2)安裝最新版本php
brew install php
2.查看是否安裝openssl,安裝了請忽略
? ? (1)查看是否安裝openssl
brew search openssl
? ? ?(2)安裝最新版本openssl
brew install openssl
3.找到openssl的安裝位置,步驟4會用到
4.進入root模式進行安裝
? ?(1)進入root模式 su root
? ?(2)安裝sudo pecl install swoole
enable sockets supports? [no] : yes
enable openssl support? [no] : yes --with-openssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1g
enable http2 support? [no] : no
enable mysqlnd support? [no] : yes
5.驗證是否安裝成功
?php -m
找到了swoole說明安裝成功
?
?
?
?
?
?