Search code examples
swoole

How to install Swoole in ubuntu


Simply my Question is How to Install Swoole in Ubuntu 14.04 LTS

I have tried

sudo pecl install swoole

am getting handfull of errors, already posted here

Is there any alternate way to install the same...


Solution

  • Swoole Installation alternate ways

    1.Install from source

    sudo apt-get install php7-dev
    git clone https://github.com/swoole/swoole-src.git
    cd swoole-src
    phpize
    ./configure
    make && make install
    

    2.Example for static compile

    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