美文网首页
jemalloc/jemalloc.h: No such fil

jemalloc/jemalloc.h: No such fil

作者: 王广帅 | 来源:发表于2020-01-11 13:48 被阅读0次
    1. 安装redis 5.0之后的版本
      先安装gcc:yum -y install gcc
    2. 进入redis项目目录之后make,报错:jemalloc/jemalloc.h: No such file or directory
    [root@localhost redis-5.0.3]# make
    cd src && make all
    make[1]: Entering directory `/home/redis/redis-5.0.3/src'
        CC Makefile.dep
    make[1]: Leaving directory `/home/redis/redis-5.0.3/src'
    make[1]: Entering directory `/home/redis/redis-5.0.3/src'
        CC adlist.o
    In file included from adlist.c:34:0:
    zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
     #include <jemalloc/jemalloc.h>
                                   ^
    compilation terminated.
    make[1]: *** [adlist.o] Error 1
    make[1]: Leaving directory `/home/redis/redis-5.0.3/src'
    make: *** [all] Error 2
    
    
    1. 解决方法
      原因是jemalloc重载了Linux下的ANSI C的malloc和free函数。解决办法:make时添加参数。
      再次执行:
      make MALLOC=libc

    相关文章

      网友评论

          本文标题:jemalloc/jemalloc.h: No such fil

          本文链接:https://www.haomeiwen.com/subject/qmnvactx.html