如何在 ubuntu 中安装 Swoole

Sum*_*ran 3 swoole

我的问题是如何在Ubuntu 14.04 LTS 中安装 Swoole

我试过了

sudo pecl install swoole
Run Code Online (Sandbox Code Playgroud)

我收到了一些错误,已经在这里发布

有没有其他方法可以安装相同的...

Sum*_*ran 6

Swoole 安装替代方式

1.从源码安装

sudo apt-get install php7-dev
git clone https://github.com/swoole/swoole-src.git
cd swoole-src
phpize
./configure
make && make install
Run Code Online (Sandbox Code Playgroud)

2. 静态编译示例

git clone -b PHP-7.2 --depth 1 https://github.com/php/php-src.git
cd php-src/
git clone -b master --depth 1 https://github.com/swoole/swoole-src.git ext/swoole
./buildconf --force
./configure --prefix=/usr/local/php7 --disable-all --enable-cli --disable-cgi --disable-fpm --disable-phpdbg --enable-bcmath --enable-hash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --enable-sockets --enable-pdo --with-sodium --with-password-argon2 --with-sqlite3 --with-pdo-sqlite --with-pcre-regex --with-zlib --with-openssl-dir --enable-swoole-static --enable-openssl --with-swoole
time make -j `cat /proc/cpuinfo | grep processor | wc -l`
sudo make install
Run Code Online (Sandbox Code Playgroud)