Linux下安装、启动redis。安装错误信息:make[3]: gcc:命令未找到;在包含自 adlist.c:34 的文件中:zmalloc.h:50:31: 错误:jemalloc/解决

  1.  wget下载安装包

    # wget http://download.redis.io/releases/redis-4.0.14.tar.gz
    
  2. 解压安装

    # tar -xf redis-4.0.14.tar.gz
    # cd redis-4.0.14
    # make &&make install
    
  3. 启动服务

    # redis-server
    2480:C 20 May 15:13:11.495 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    2480:C 20 May 15:13:11.495 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=2480, just started
    2480:C 20 May 15:13:11.495 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
    2480:M 20 May 15:13:11.496 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                    _._                                                  
               _.-``__ ''-._                                             
          _.-``    `.  `_.  ''-._           Redis 4.0.14 (00000000/0) 64 bit
      .-`` .-```.  ```\/    _.,_ ''-._                                   
     (    '      ,       .-`  | `,    )     Running in standalone mode
     |`-._`-...-` __...-.``-._|'` _.-'|     Port: xxxx
     |    `-._   `._    /     _.-'    |     PID: xxxx
      `-._    `-._  `-./  _.-'    _.-'                                   
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |           http://redis.io        
      `-._    `-._`-.__.-'_.-'    _.-'                                   
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |                                  
      `-._    `-._`-.__.-'_.-'    _.-'                                   
          `-._    `-.__.-'    _.-'                                       
              `-._        _.-'                                           
                  `-.__.-'               
  4. 安装报错信息解决

    1. 报错提示:make[3]: gcc:命令未找到;原因:没有安装gcc环境,yum install gcc

      /bin/sh: cc: command not found
      make[1]: *** [adlist.o] 错误 127
      make[1]: Leaving directory `/home/software/redis-4.0.14/src'
      make: *** [install] 错误 2
      
      [root@localhost ~]# yum install gcc
      
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
       * base: mirrors.aliyun.com
      -------------------------------
    2. 报错提示:在包含自 adlist.c:34 的文件中:zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:没有那个文件或目录
      措施:#  make MALLOC=libc

      在包含自 adlist.c:34 的文件中:
      zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:没有那个文件或目录
      zmalloc.h:55:2: 错误:#error "Newer version of jemalloc required"
      make[1]: *** [adlist.o] 错误 1
      make[1]: Leaving directory `/home/software/redis-4.0.14/src'
      make: *** [all] 错误 2
      [root@localhost redis-4.0.14]#  make MALLOC=libc
      cd src && make all
      make[1]: Entering directory `/home/software/redis-4.0.14/src'
      ------------------------------

       


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值