redis 编译安装报错 jemalloc/jemalloc.h: No such file or directory

 

redis编译安装遇到的坑

    $ wget http://download.redis.io/releases/redis-3.2.3.tar.gz
    $ tar xzf redis-3.2.3.tar.gz
    $ mv redis-3.2.3 redis
    $ cd redis
    $ make
make 出现错误:gcc: Command not found
所以安装
yum install gcc gcc-c++  -y

再次make,报错

zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

清理上次编译残留文件,重新编译

make distclean  && make
成功编译!
Hint: It's a good idea to run 'make test' ;)

make[1]: 离开目录“/root/redis01/src”
 
 
 
 
 
 
 
 
原文地址:https://www.cnblogs.com/suixinnan/p/13919831.html