Homestead 安装 swoole

Homestead 安装 swoole

PHP 2 years ago 1538 0

安装

安装最新版本:pecl install swoole
安装指定版本:pecl install swoole-4.8.13

Tip: No releases available for package "pecl.php.net/swoole" 报错执行以下命令

pecl channel-update pecl.php.net

成功返回

Build process completed successfully
Installing '/usr/include/php/20190902/ext/swoole/config.h'
Installing '/usr/lib/php/20190902/swoole.so'
install ok: channel://pecl.php.net/swoole-4.4.13
configuration ⌥ "php_ini" is not set to php.ini location
You should add "extension=swoole.so" to php.ini

开启 swoole 扩展

查看 php 版本,我这是 7.4  
sudo vi /etc/php/7.4/cli/php.ini 添加上 extension=swoole.so

重启配置

sudo service php7.4-fpm restart
php --ri swoole 查看是否安装成功

原文: http://yiqiao.me/articles/30/homestead-install-swoole

版权声明: 自由转载-非商用-非衍生-保持署名 (创意共享3.0许可证)