New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling swoole with redis not working in ubuntu 18.04 for php7.2 #2033

ardabeyazoglu opened this Issue Oct 12, 2018 · 3 comments


None yet
3 participants

ardabeyazoglu commented Oct 12, 2018

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a simple script for reproducing the error.
    I clone the source code with git clone, run the following commands:

./configure --with-php-config=/usr/bin/php-config --enable-debug-log=no --enable-sockets=yes --enable-openssl=yes --enable-http2=yes --enable-async-redis=yes --enable-mysqlnd=yes --enable-coroutine-postgresql=no

  1. What did you expect to see?
    Compiled swoole extension...

  2. What did you see instead?
    Configure works ok, however make fails because of following error:
    swoole-src/swoole_redis.c:20:10: fatal error: hiredis/hiredis.h: No such file or directory

Then i downloaded hiredis source into the working directory and run make again. This time it failed like this:

/usr/bin/x86_64-linux-gnu-ld: cannot find -lhiredis
collect2: error: ld returned 1 exit status
Makefile:425: recipe for target '' failed
  1. What version of Swoole are you using (show your php --ri swoole)?

  2. What is your machine environment used (including version of kernel & php & gcc) ?
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.1 LTS
    Release: 18.04
    Codename: bionic
    Kernel: 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    Php: 7.2.10-0ubuntu0.18.04.1
    Gcc: (Ubuntu 7.3.0-16ubuntu3) 7.3.0


This comment has been minimized.


twose commented Oct 12, 2018

you must install hiredis:


This comment has been minimized.

flddr commented Oct 12, 2018

@ardabeyazoglu sudo apt install libhiredis-dev

@twose twose added the question label Oct 13, 2018


This comment has been minimized.

ardabeyazoglu commented Oct 21, 2018


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment