Uncaught Error: Class 'Swoole\Coroutine' not found

新手上路,请多包涵

安装启动报错: Uncaught Error: Class 'SwooleCoroutine' not found

小白一个 不明真相

阅读 8.4k
1 个回答
新手上路,请多包涵

没装swoole,或者没有安装php对应版本的swoole扩展。

官方有说明,swoole>=4.4.1
https://github.com/swoole/swo...
下载最新版swoole,编译一下,会生成一个swoole.so

php -i |grep php.ini
找一下当前php版本的php.ini文件位置,并加上
extension=/你的路径/swoole.so

php -m | grep swoole
验证一下扩展是否安装上

再次
php ./bin/swoft http:start
即可